コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        battleSystemFossil = GameObject.FindGameObjectWithTag("BattleSystem").GetComponent <BattleSystemFossil>();

        Button btn = this.GetComponent <Button>();

        btn.onClick.AddListener(delegate { battleSystemFossil.EnemySelect(this.gameObject); });
    }// Grabs the BattleSystem script and assigns it to the empty variable battleSystemFossil
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     battleSystemFossil = GameObject.FindGameObjectWithTag("BattleSystem").GetComponent <BattleSystemFossil>();
     playerStats        = GameObject.Find("Player (1)").GetComponent <UnitStats>();
     cameraShake        = this.gameObject.GetComponent <CameraShake>();
 }// Grabs the BattleSystem script and assigns it to the empty variable battleSystemFossil, also sets enemy ID
コード例 #3
0
 void Start()
 {
     battleSystemFossil = GameObject.FindGameObjectWithTag("BattleSystem").GetComponent <BattleSystemFossil>();
     enemyGlow          = gameObject.transform.GetChild(0).GetChild(1).gameObject.GetComponent <Image>();
     targetSelect       = gameObject.transform.GetChild(1).gameObject.GetComponent <Image>();
 }