daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Nov 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5.  
  6. [Serializable]
  7. public class PlayObject
  8. {
  9.     private float G = 6.67408f * Mathf.Pow(10, -11);
  10.     public float mass { set; get; }
  11.     public float radius { set; get; }
  12.     public string keyName { set; get; }
  13.     public PlayObject() { }
  14.     public float Gravity(PlayObject first, PlayObject second, float R)
  15.     {
  16.         return (G * first.mass * second.mass) / Mathf.Pow(R, 2);
  17.     }
  18.     public void Init()
  19.     {
  20.         mass = mass * 5.97219f * Mathf.Pow(10, 24);
  21.         radius = radius * 6371000;
  22.     }
  23. }
  24.  
  25. public class Rocket
  26. {
  27.     public float gas_mass { get; set; }
  28.     public float rocket_angle { get; set; }
  29.     public float gas_speed { get; set; }
  30.     public PlayObject rocket { get; set; }
  31. }
  32.  
  33. public class Game : MonoBehaviour
  34. {
  35.  
  36.     StaticData staticData;
  37.     // Use this for initialization
  38.     void Start()
  39.     {
  40.         GameObject.Find("[StaticData]").GetComponent<StaticData>();
  41.     }
  42.  
  43.     // Update is called once per frame
  44.     void Update()
  45.     {
  46.  
  47.     }
  48. }
RAW Paste Data
Top