コード例 #1
0
ファイル: DestroyOnHit.cs プロジェクト: neidt/Game121Project2
 // Use this for initialization
 void Start()
 {
     winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>();
     playerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>();
     //playerHealth2 = GameObject.FindGameObjectWithTag("PlayerWScript").GetComponent<PlayerMovement>();
     shooterHealth = GameObject.FindGameObjectWithTag("Enemy").GetComponent <ShooterScript>();
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     rb         = transform.parent.GetComponent <Rigidbody>();
     myAnimator = transform.parent.GetComponent <Animator>();
     AudioSource[] audioList = GetComponentsInParent <AudioSource>();
     fireball     = audioList[0];
     gotHit       = audioList[1];
     winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>();
     endCamera    = GameObject.FindGameObjectWithTag("EndCamera");
     mainCamera   = GameObject.FindGameObjectWithTag("MainCamera");
 }
コード例 #3
0
ファイル: DestroyOnHit.cs プロジェクト: neidt/Game121JCCC18
 // Use this for initialization
 void Start()
 {
     winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>();
 }