コード例 #1
0
    // Start is called before the first frame update
    private void Start()
    {
        monsterMovement     = GetComponent <MonsterMovement>();
        monsterAudioManager = GetComponent <MonsterAudioManager>();

        monsterStateGoToSound              = GetComponent <MonsterStateGoToSound>();
        monsterStateGoToSound.OnExitState += ExitStateGoToSound;

        monsterStateInvestigatePoint              = GetComponent <MonsterStateInvestigate>();
        monsterStateInvestigatePoint.OnExitState += ExitStateInvestigatePoint;

        monsterStateWander = GetComponent <MonsterStateWander>();

        monsterStateWander.EnterState();
        currentState = MonsterState.Wander;
    }
コード例 #2
0
 void Awake()
 {
     inst = this;         // Setup singleton
 }