private void onSetAI(object param)
        {
            Int32 Param = Int32.Parse((String)param);

            switch (Param)
            {
            case 0:
                model.removeAI();
                break;

            case 1:
                AlphaBetaAI abAI = new AlphaBetaAI();
                model.setAI(abAI);
                break;

            case 2:
                GeneralAI genAI = new GeneralAI();
                model.setAI(genAI);
                break;

            case 3:
                MinimaxAI mmAI = new MinimaxAI();
                model.setAI(mmAI);
                break;
            }
        }
예제 #2
0
        void SetupAll()
        {
            if (QuestController.currentQuest.eventID == 1)
            {
                Transform currentRoom = RoomManager.GetCurrentActiveRoom().transform;
                questDrop1 = Instantiate(Resources.Load("Drops"), transform.position, Quaternion.identity, currentRoom) as GameObject;
                questDrop1.GetComponent <Drops> ().databaseItemID            = 26;
                questDrop1.GetComponentInChildren <SpriteRenderer> ().sprite = questDrop1spr;
            }

            if (QuestController.currentQuest.eventID == 2)
            {
                //Need to make a special drone for this later, 100% drop rate
                //set a boolean and an ID to specify if there is a specific drop by ID
                Transform currentRoom = RoomManager.GetCurrentActiveRoom().transform;
                specialDrone = Instantiate(Resources.Load("Drone"), transform.position, Quaternion.identity, currentRoom) as GeneralAI;
                if (specialDrone != null)
                {
                    droneUp = true;
                    specialDrone.EnemySetup(2, 1, GeneralAI.Behaviour.random);
                }
            }

            if (QuestController.currentQuest.eventID == 3)
            {
                print("heat damage, this quest does not function yet");
                //need something that does continuous damage based on the current room
                //this will need UI components, red around the sides?
                //Do we implement hacking as planned?
            }

            if (QuestController.currentQuest.eventID == 4)
            {
                Transform currentRoom = RoomManager.GetCurrentActiveRoom().transform;
                specialTurret = Instantiate(Resources.Load("Turret"), transform.position, Quaternion.identity, currentRoom) as GameObject;
                specialTurret.GetComponent <RobotLoadout> ().loadout[1].itemHitpoints = 75;
                specialTurret.GetComponentInChildren <SpriteRenderer> ().color        = Color.red;

                //100% drop, deactivate color and give a special sprite later?
            }

            if (QuestController.currentQuest.eventID == 5)
            {
                Transform currentRoom = RoomManager.GetCurrentActiveRoom().transform;
                cStation = Instantiate(Resources.Load("ChargingStation"), transform.position, Quaternion.identity, currentRoom) as GameObject;
                print("Spawn recharging station");
                Instantiate(Resources.Load("Drone"), transform.position + new Vector3(10, 5, 0), Quaternion.identity, currentRoom);
                //Give station health
            }
            setupDone = true;
        }
예제 #3
0
 public void NPCCollision(GeneralAI npc, string state)
 {
     if (!playerInvis) {
         npc.Action (state);
     }
 }
예제 #4
0
 internal void AskForCommands()
 {
     GeneralAI.SendInstructions(GENERAL_STATUS.BATTLE_DONE, this);
 }