// Start is called before the first frame update
 void Start()
 {
     gsm        = GameObject.FindGameObjectWithTag("GameStateMachine").GetComponent <GameStateMachine>();
     monsterMov = GetComponent <MonsterMovement>();
     mb         = GetComponent <MonsterBrain>();
     ma         = GetComponent <MonsterAttack>();
 }
    // Start is called before the first frame update
    void Start()
    {
        monsterBrain = GameObject.FindGameObjectWithTag("Monster").GetComponent <MonsterBrain>();

        //Transform[] tempArray = GetComponentsInChildren<Transform>();
        //sectorRooms = new GameObject[tempArray.Length];
        //for(int i = 0; i < sectorRooms.Length; i++)
        //{
        //    sectorRooms[i] = tempArray[i].gameObject;
        //}

        //Loop through all rooms and set their ID
        Room tempRoom;

        for (int i = 0; i < sectorRooms.Length; i++)
        {
            tempRoom        = sectorRooms[i].GetComponent <Room>();
            tempRoom.roomID = i;
        }

        if (playersRoom == null)
        {
            playersRoom = sectorRooms[0].GetComponent <Room>();
        }
    }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        clownTrans = this.GetComponent <Transform>();

        monsterBrain = GameObject.FindWithTag("Monster").GetComponent <MonsterBrain>();

        monsterBrain.minionsSpawned++;
    }
Beispiel #4
0
    public override void EnterState(MonsterAI _owner)
    {
        _owner.currentState = MonsterAI.MonsterState.BreakerSwitch;

        monsterBrain = _owner.GetMonsterBrain();
        breaker      = GameObject.Find("Breaker");

        _owner.target = breaker.transform;
    }
    // Start is called before the first frame update
    void Start()
    {
        ghostRb    = this.GetComponent <Rigidbody2D>();
        ghostTrans = this.GetComponent <Transform>();

        monsterBrain = GameObject.FindWithTag("Monster").GetComponent <MonsterBrain>();

        monsterBrain.minionsSpawned++;
    }
    //*************************************************



    public override void EnterState(MonsterAI _owner)
    {
        monsterBrain = _owner.GetMonsterBrain();
        Sector sector = monsterBrain.currentSector;
        //Debug.Log(sector);
        GameObject gameRoom = sector.getRandomRoom();
        Room       room     = gameRoom.GetComponent <Room>();

        //_owner.setTargetAsTransform(room.moveSpots[0]);
        _owner.target = room.moveSpots[0];
    }
Beispiel #7
0
    // Start is called before the first frame update
    void Start()
    {
        startStateTime = Time.unscaledTime;
        stateMachine   = new StateMachine <MonsterAI>(this);
        ai             = GetComponent <IAstarAI>();
        fov            = GetComponent <FovDetection>();
        monsterBrain   = GetComponent <MonsterBrain>();



        GoToNextState();
    }
Beispiel #8
0
    public override void EnterState(MonsterAI _owner)
    {
        _owner.currentState = MonsterAI.MonsterState.BlockDoor;

        monsterBrain = _owner.GetMonsterBrain();


        door = pickRoomDoor();


        _owner.target = door.transform;
    }
Beispiel #9
0
    protected void Awake()
    {
        playerGo = GameObject.FindGameObjectWithTag("Player");
        GameObject monsterGo = GameObject.FindGameObjectWithTag("Monster");

        psm  = playerGo.GetComponent <PlayerStateMachine>();
        pInv = playerGo.GetComponent <PlayerInventory>();
        if (monsterGo)
        {
            mBrain = monsterGo.GetComponent <MonsterBrain>();
        }
        canvasInteraction = GetComponentInChildren <Canvas>();
        obj = GetComponent <UsableObject>();
    }
Beispiel #10
0
    public override void EnterState(MonsterAI _owner)
    {
        _owner.currentState = MonsterAI.MonsterState.Intimidate;

        monsterBrain = GameObject.FindGameObjectWithTag("Monster").GetComponent <MonsterBrain>();
        playerRoom   = monsterBrain.currentSector.playersRoom.GetComponent <Room>();
        moveSpots    = playerRoom.moveSpots;

        index = 0;

        //_owner.setTargetAsTransform(moveSpots[index]);
        _owner.target = moveSpots[index];
        //Debug.Log(_owner.target);
    }
Beispiel #11
0
    public override void EnterState(MonsterAI _owner)
    {
        _owner.currentState = MonsterAI.MonsterState.SpawnMinion;

        monsterBrain = _owner.GetMonsterBrain();

        spawnPoint = ChooseSpawnPoint(_owner);

        if (spawnPoint == null)
        {
            _owner.GoToNextState();
        }

        //_owner.setTargetAsTransform(spawnPoint);
        _owner.target = spawnPoint;
    }
Beispiel #12
0
 public void InitEachBrain()
 {
     brain = new MonsterBrain(numInputs, numOutputs, numNEachLayer, alpha, discount);
     Debug.Log(brain);
 }
Beispiel #13
0
 public Monster(MonsterData monsterData) : base(monsterData)
 {
     Data  = monsterData;
     Brain = DarkestDungeonManager.Data.Brains[monsterData.MonsterBrainId];
 }
Beispiel #14
0
 public Monster(FormationUnitSaveData unitSaveData) :
     base(unitSaveData, DarkestDungeonManager.Data.Monsters[unitSaveData.Name])
 {
     Data  = DarkestDungeonManager.Data.Monsters[unitSaveData.Name];
     Brain = DarkestDungeonManager.Data.Brains[Data.MonsterBrainId];
 }
 // Start is called before the first frame update
 private void Awake()
 {
     msm  = GetComponent <MonsterStateMachine>();
     mb   = GetComponent <MonsterBrain>();
     anim = GetComponentInChildren <Animator>();
 }
    private void Start()
    {
        anim = GetComponent <Animator>();

        monsterBrain = GameObject.FindWithTag("Monster").GetComponent <MonsterBrain>();
    }
Beispiel #17
0
 void Start()
 {
     monsterBrain = GameObject.FindWithTag("Monster").GetComponent <MonsterBrain>();
 }
 void Start()
 {
     mb  = GetComponent <MonsterBrain>();
     msm = GetComponent <MonsterStateMachine>();
 }