Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     player_movementSpeed = GameObject.Find("Player").GetComponent <Player> ();
     health    = GameObject.Find("Player").GetComponent <PlayerClass> ();
     bulletObj = Resources.Load("Prefabs/bullet") as GameObject;
     bullet    = bulletObj.GetComponent <bulletClass>();
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     bull   = Resources.Load("Prefabs/bullet") as GameObject;
     bullet = bull.GetComponent <bulletClass> ();
     bull.GetComponent <Transform> ().localScale     = bulletScale;
     bull.GetComponent <bulletClass> ().healthPoints = hp_default;
 }