Example #1
0
 internal void call_rescue(Rescue_Modes mode, int id, int ally_id, Vector2 player_loc)
 {
     Global.player.loc             = player_loc;
     Global.player.instant_move    = true;
     RescueState.rescue_calling    = mode;
     Global.game_system.Rescuer_Id = id;
     Global.game_system.Rescuee_Id = ally_id;
 }
Example #2
0
 internal override void read(BinaryReader reader)
 {
     Rescue_Calling = (Rescue_Modes)reader.ReadInt32();
     In_Rescue      = (Rescue_Modes)reader.ReadInt32();
     Rescue_Phase   = reader.ReadInt32();
     Rescuer_Id     = reader.ReadInt32();
     Rescuee_Id     = reader.ReadInt32();
     Giver_Id       = reader.ReadInt32();
 }
Example #3
0
        private IEnumerable <bool> end_rescue()
        {
            Rescuer_Id       = -1;
            Rescuee_Id       = -1;
            Giver_Id         = -1;
            Rescue_Mover_Id  = -1;
            Rescue_Target_Id = -1;
            In_Rescue        = 0;
            Rescue_Phase     = 0;

            yield break;
        }
Example #4
0
        internal override void update()
        {
            if (Rescue_Calling != 0)
            {
                In_Rescue      = Rescue_Calling;
                Rescue_Calling = 0;
            }
            if (in_rescue)
            {
                switch (Rescue_Phase)
                {
                case 0:
                    rescue_setup();
                    Rescue_Phase++;
                    if (Global.game_state.is_player_turn)     // not suspending on AI turn so I can inspect AI rescue choices //Debug
                    {
                        if (!Global.game_system.is_interpreter_running)
                        {
                            Global.scene.suspend();
                        }
                    }
                    break;

                case 1:
                    if (Global.game_state.support_gain_active)
                    {
                        break;
                    }
                    if (!any_behaviors)
                    {
                        add_behavior(wait_behavior(3));
                        add_behavior(setup_rescue());
                    }
                    apply_behaviors();
                    break;
                }
            }
        }