예제 #1
0
    protected new void Start()
    {
        mapConfig = new MapConfig();
        born      = mapConfig.getRoomRandCWithRoomLoc(new Vector2(transform.position.x, transform.position.y)).Value;
        statusBar = GameObject.Find("statusBar").GetComponent <statusBarController>();
        target    = scout;
        next      = born;

        /*
         * if (tag == "servant")
         * {
         *  target = scout;
         *  next = born;
         * }
         * else
         * {
         *  target = born;
         *  next = born;
         * }*/
        //doorTileMap = GameObject.FindGameObjectWithTag("doorTile").GetComponent<Tilemap>();
        player           = GameObject.FindGameObjectWithTag("Player");
        playerController = player.GetComponent <PlayerController>();
        //mapConfig = GameObject.FindObjectOfType<AutoGenerateMap>().config;
        pathFinder = GameObject.FindObjectOfType <TutorialObserverController>().pathFinder;
        base.Start();
    }
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     Destroy(gameObject, duration);
     Debug.Log("start skill");
     statusBar       = GameObject.Find("statusBar").GetComponent <statusBarController>();
     musicController = GameObject.Find("AudioController").GetComponent <AudioFX>();
 }
예제 #3
0
 protected new void Start()
 {
     born      = GameObject.FindObjectOfType <AutoGenerateMap>().config.getRoomRandCWithRoomLoc(new Vector2(transform.position.x, transform.position.y)).Value;
     statusBar = GameObject.Find("statusBar").GetComponent <statusBarController>();
     if (tag == "servant")
     {
         target = scout;
         next   = born;
     }
     else
     {
         target = born;
         next   = born;
     }
     doorTileMap      = GameObject.FindGameObjectWithTag("doorTile").GetComponent <Tilemap>();
     player           = GameObject.FindGameObjectWithTag("Player");
     playerController = player.GetComponent <PlayerController>();
     mapConfig        = GameObject.FindObjectOfType <AutoGenerateMap>().config;
     pathFinder       = GameObject.FindObjectOfType <ObveserController>().pathFinder;
     base.Start();
 }