Ejemplo n.º 1
0
 void Awake()
 {
     sectionRendering = GameObject.Find("IngameScene").GetComponent <SectionRendering>();
     sceneEventSystem = sectionRendering.GetComponent <SceneEventSystem>();
     player           = sceneEventSystem.Player;
     playerRayCast    = player.GetComponent <PlayerRayCast>();
     playerProperty   = player.GetComponent <PlayerProperty>();
     floorEntrance    = GameObject.Find("FloorEntrance");
 }
Ejemplo n.º 2
0
    void OnEnable()
    {
        sectionRendering = sceneEventSystem.GetComponent <SectionRendering>();
        sectionRendering.FloorInit(sectionList, doorList);
        Transform zombies = GameObject.Find("1FZombies").transform;

        if (currentFloorUI.GetComponent <Text>().text != "1F")
        {
            currentFloorUI.UIupdate("1F");
        }
        for (int i = 0; i < zombies.childCount; i++)
        {
            if (zombies.GetChild(i).gameObject.activeInHierarchy)
            {
                zombies.GetChild(i).GetComponent <Enemy>().StartFSM();
            }
        }
    }
Ejemplo n.º 3
0
    void OnEnable()
    {
        Transform zombies = GameObject.Find("2FZombies").transform;

        waitTime         = new WaitForFixedUpdate();
        sectionRendering = sceneEventSystem.GetComponent <SectionRendering>();
        sectionRendering.FloorInit(sectionList, doorList);
        currentFloorUI.UIupdate("2F");

        for (int i = 0; i < zombies.childCount; i++)
        {
            if (zombies.GetChild(i).gameObject.activeInHierarchy)
            {
                zombies.GetChild(i).GetComponent <Enemy>().StartFSM();
            }
        }

        if (!IsBroadcasted)
        {
            StartCoroutine(MovedZombieDirect());
        }
    }
Ejemplo n.º 4
0
 public void FloorInit()
 {
     sectionRendering = sceneEventSystem.GetComponent <SectionRendering>();
     sectionRendering.FloorInit(sectionList, doorList);
 }