private void Start()
 {
     bgImg          = GetComponent <Image>();
     joystickImg    = transform.GetChild(0).GetComponent <Image>();
     InputDirection = Vector2.zero;
     Gunctrlr       = FindObjectOfType <GunConroller>();
 }
示例#2
0
 void Awake()
 {
     myRigidbody = GetComponent <Rigidbody> ();
     Mygunctrlr  = GetComponent <GunConroller>();
     FindObjectOfType <EnemySpawner> ().OnNewWave += OnNewWave;
 }