예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        gamemanager = GameObject.Find("GameManager").GetComponent <GameManager>();
        warpzone1   = GameObject.Find("warpzone1");
        warpzone2   = GameObject.Find("warpzone2");
        warpzone3   = GameObject.Find("warpzone3");
        warpzone4   = GameObject.Find("warpzone4");
        warpzone5   = GameObject.Find("warpzone5");
        warpzone6   = GameObject.Find("warpzone6");
        warpzone7   = GameObject.Find("warpzone7");
        warpzone8   = GameObject.Find("warpzone8");

        if (!training)
        {
            //player = GameObject.Find("Player");
            playercontroll = player.GetComponent <PlayerControll>();
        }
        else
        {
            //player = GameObject.Find("Player_AI");
            player_AI = player.GetComponent <Player_AI>();
        }
        //Enemy = GameObject.Find("Enemy");
        enemy_AI  = Enemy.GetComponent <EnemyAI>();
        enemy_2AI = Enemy_2.GetComponent <Enemy_2AI>();
        enemy_3AI = Enemy_3.GetComponent <Enemy_3AI>();
    }
예제 #2
0
 // スタート時に呼ばれる
 public override void Initialize()
 {
     _rigidBody = GetComponent <Rigidbody>();
     anim       = GetComponent <Animator>();
     enemy      = Target.GetComponent <EnemyAI>();
     enemy_2    = Target2.GetComponent <Enemy_2AI>();
     enemy_3    = Target3.GetComponent <Enemy_3AI>();
     timenow    = enemy.timenow;
     timelimit  = enemy.timelimit;
     Floor_X    = Floor.localScale.x - 4;
     Floor_Z    = Floor.localScale.z - 4;
 }
예제 #3
0
 // スタート時に呼ばれる
 public override void Initialize()
 {
     _rigidBody  = GetComponent <Rigidbody>();
     anim        = GetComponent <Animator>();
     gamemanager = GameObject.Find("GameManager").GetComponent <GameManager>();
     enemy_1     = Enemy_1.GetComponent <EnemyAI>();
     enemy_3     = Enemy_3.GetComponent <Enemy_3AI>();
     // player_AI = Target.GetComponent<Player_AI>();
     player_AI = Target.GetComponent <PlayerControll>();
     timenow   = 0f;
     floorMask = LayerMask.GetMask("Wall");
     Floor_X   = Floor.localScale.x * MainField.localScale.x - 10f * MainField.localScale.x;
     Floor_Z   = Floor.localScale.z * MainField.localScale.z - 10f * MainField.localScale.z;
 }