Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        props = GetComponent <UniversalProperties>();

        boost = false;

        rb = GetComponent <Rigidbody2D>();

        mainRocket = transform.Find("Nozzle").transform.Find("Rocket").GetComponent <Thruster>();

        rcs = new List <ParticleSystem>();
        foreach (ParticleSystem ps in GetComponentsInChildren <ParticleSystem>())
        {
            if (ps.name.Contains("RCS"))
            {
                ps.GetComponent <Thruster>().multiplier = MoveSpeed;
                rcs.Add(ps);
            }
        }
        alt  = Mathf.Round(Vector3.Distance(rb.position, Vector3.zero));
        apo  = alt;
        peri = alt;
    }
Esempio n. 2
0
 void Start()
 {
     uniProperties = GetComponent <UniversalProperties>();
     health        = 1;
     onGridtile    = GridTile.FindClosestGridTile(transform.position);
 }