コード例 #1
0
ファイル: B2Tail.cs プロジェクト: kurosakykamy/Space-Duck
 // Use this for initialization
 void Start()
 {
     Life = 1;
     duck = GameObject.Find("Duck").GetComponent <DuckController>();
     boss = GameObject.Find("Boss 2").GetComponent <Boss02>();
     dx   = GameObject.Find("Duck").GetComponent <Transform>().position.x;
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        myState    = state.phase01;
        player     = GameObject.FindGameObjectWithTag("Player");
        Arrow      = GameObject.FindGameObjectWithTag("Arrow");
        shield     = GameObject.FindGameObjectWithTag("Shield");
        boss       = GameObject.FindGameObjectWithTag("Boss2");
        bossScript = boss.GetComponent <Boss02> ();

        AP = Arrow.GetComponent <ArrowPoint>();

        numPowerPlants = 0;
        foreach (GameObject go in powerPlantsMain)
        {
            if (go != null)
            {
                numPowerPlants++;
            }
        }

        foreach (GameObject go in powerPlantsBase)
        {
            if (go != null)
            {
                numPowerPlants++;
            }
        }
    }
コード例 #3
0
 void Start()
 {
     Alien01Receiver       = GetComponentInParent <Alien01>();
     boss01Receiver        = GetComponentInParent <Boss01>();
     boss02Receiver        = GetComponentInParent <Boss02>();
     boss03Receiver        = GetComponentInParent <YetyBoss>();
     Neanderthal01Receiver = GetComponentInParent <Neanderthal>();
     thisTrigger           = GetComponent <Collider>();
 }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        myState = state.phase01;
        player = GameObject.FindGameObjectWithTag("Player");
        Arrow = GameObject.FindGameObjectWithTag("Arrow");
        shield = GameObject.FindGameObjectWithTag("Shield");
        boss = GameObject.FindGameObjectWithTag("Boss2");
        bossScript = boss.GetComponent<Boss02> ();

        AP = Arrow.GetComponent<ArrowPoint>();

        numPowerPlants = 0;
        foreach (GameObject go in powerPlantsMain)
        {
            if(go != null)
            {
                numPowerPlants++;
            }
        }

        foreach (GameObject go in powerPlantsBase)
        {
            if(go != null)
            {
                numPowerPlants++;
            }
        }
    }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     Player = GameObject.FindGameObjectWithTag("Player");
     Boss02.SetActive(false);
     Boss02Script = Boss02.GetComponent <Boss02>();
 }
コード例 #6
0
 void Start()
 {
     boss02    = GameObject.FindObjectOfType <Boss02>();
     health    = boss02.getHealth();
     newHealth = health;
 }