예제 #1
0
    // Use this for initialization
    void Start()
    {
        thePlayer = GameObject.FindGameObjectWithTag("Player");
        if (thePlayer == null)
        {
            Debug.LogError("thePlayer not found.");
        }

        thePlayerStatus = thePlayer.GetComponent <PlayerStatus>();
        if (thePlayerStatus == null)
        {
            Debug.LogError("thePlayerStatus not found.");
        }

        theBoss = GameObject.FindGameObjectWithTag("Boss");
        if (theBoss == null)
        {
            Debug.LogError("theBoss not found.");
        }

        fsmBoss = theBoss.GetComponent <FSMBoss>();
        if (fsmBoss == null)
        {
            Debug.Log("fsmBoss not found.");
        }
    }
예제 #2
0
 void Awake()
 {
     fsm = FindObjectOfType <FSMBoss>();
     if (fsm == null)
     {
         Debug.LogError("fsm not found");
     }
 }
예제 #3
0
 void Awake()
 {
     fsmBoss = FindObjectOfType <FSMBoss>();
     if (fsmBoss == null)
     {
         Debug.LogError("bossController not found");
     }
 }
예제 #4
0
 void Awake()
 {
     ballExplosion = gameObject.transform.Find("BallExplosion").gameObject;
     ball          = gameObject.transform.Find("Ball").gameObject;
     smoke         = gameObject.transform.Find("Ball/Smoke").gameObject;
     if (GameObject.FindGameObjectWithTag("Boss"))
     {
         fsmBoss        = GameObject.FindGameObjectWithTag("Boss").GetComponent <FSMBoss>();
         timeToGenerate = fsmBoss.preBallAttackDuration;
     }
     particlesManager = GameObject.Find("ParticlesManager");
 }
예제 #5
0
    void Awake()
    {
        Scene scene = SceneManager.GetActiveScene();

        if (scene.name == "Dungeon Boss")
        {
            fsmBoss   = GameObject.FindGameObjectWithTag("Boss").GetComponent <FSMBoss>();
            bossStats = GameObject.FindGameObjectWithTag("Boss").GetComponent <EnemyStats>();
        }

        contains          = new List <GameObject>();
        tornadoBodyScript = tornadoBodyGO.GetComponent <TornadoBody>();
        tornadoBodyPS     = tornadoBodyGO.GetComponent <ParticleSystem>();
        tornadoBasePS     = tornadoBaseGO.GetComponent <ParticleSystem>();
    }
예제 #6
0
    void Awake()
    {
        fsmBoss = FindObjectOfType <FSMBoss>();
        if (fsmBoss == null)
        {
            Debug.LogError("Error: fsmBoss not found");
        }

        movingDoors = GameObject.FindGameObjectsWithTag("MovingDoor");
        if (movingDoors.Length == 0)
        {
            Debug.Log("Error : movingDoor not found.");
        }

        sightRange = GetComponent <BoxCollider>();

        //Collider starting size
        sightRange.size = new Vector3(24.0f, 7.0f, 5.0f);
    }
예제 #7
0
    void Awake()
    {
        Scene scene = SceneManager.GetActiveScene();

        if (scene.name == "Dungeon Boss")
        {
            fsmBoss   = GameObject.FindGameObjectWithTag("Boss").GetComponent <FSMBoss>();
            bossStats = GameObject.FindGameObjectWithTag("Boss").GetComponent <BossStats>();
        }

        contains = new List <GameObject>();

        tornadoCirclesPS = tornadoCircleGO.GetComponent <ParticleSystem>();
        foggyBasePS      = foggyBaseGO.GetComponent <ParticleSystem>();
        smallFragmentsPS = smallFragmentsGO.GetComponent <ParticleSystem>();

        player       = GameObject.FindGameObjectWithTag("Player");
        playerStatus = player.GetComponent <PlayerStatus>();

        tornadoEyeTr   = transform.FindChild("TornadoEye");
        tornadoCircles = new ParticleSystem.Particle[tornadoCirclesPS.main.maxParticles];
    }
예제 #8
0
    // Use this for initialization

    void Awake()
    {
        fsmBoss = FindObjectOfType <FSMBoss>();
    }