//Rigidbody rigidbody;

    void Start()
    {
        GameObject gun = GameObject.Find("Gunner");

        ammo      = gun.GetComponent <Gun> ().getAmmoInfo();
        Speed     = ammo.getSpeed();
        Score     = ammo.getScore();
        Direction = ammo.getDirection();
        //	rigidbody = GetComponent<Rigidbody> ();
        DOTween.Init();
    }
Beispiel #2
0
    void Start()
    {
        spawer = new Spawer1();
        ammo   = new Ammo1();
        //Debug.Log (spawer.getPrefab());
        gun = Object.Instantiate(spawer.getPrefab(), transform, false);

        L = (Screen.height / 2) / 14;
        GameObject g = GameObject.Find("Main Camera");

        CameraControll = g.GetComponent <Controll> ();
        CameraTraform  = g.GetComponent <Transform> ();
        camera         = g.GetComponent <Camera>();
        DirectionLine  = GetComponent <LineRenderer> ();
    }
Beispiel #3
0
 public void setAmmo(AmmoBehavior ammo)
 {
     this.ammo = ammo;
 }