Beispiel #1
0
    void Awake()
    {
        Combat.CombatMode mode = Manager.Instance.Object.CombatMode;

        mode.StartUserBattleEvent.Attach(onStartUserBattle);
        mode.EndUserBattleEvent.Attach(onEndUserBattle);
    }
Beispiel #2
0
    //
    void Awake()
    {
        // load
        Nurture.Calendar calendar = loadCalendar();

        _mainCharacter = loadMainCharacter(calendar);
        loadAllStat(_mainCharacter);

        Story.TargetCharacter targetCharacter = loadTargetCharacter();

        // story
        _storyMode = new Story.Mode(targetCharacter);

        // nurture
        _nurtureMode = new Nurture.Mode(calendar, _mainCharacter);

        // board game
        _boardGameMode = new BoardGame.BoardGameMode();

        // combat
        _combatMode = new Combat.CombatMode();

        // events
        _endNurtureEvent = new EndNurtureEvent();

        // attach handler
        NurtureMode.Schedule.EndEvent.Attach(onScheduleEnd);
    }
    private void onClick()
    {
        Log.Debug("click combat trick button");

        Combat.CombatMode mode = Manager.Instance.Object.CombatMode;
        mode.EndUserBattleEvent.Invoke();
        mode.UserPlayer.Trick();
    }
Beispiel #4
0
    //
    void Awake()
    {
        setPlayerNameText(string.Empty);
        setSuffixText(string.Empty);

        Combat.CombatMode mode = Manager.Instance.Object.CombatMode;
        mode.StartUserBattleEvent.Attach(onStartUserBattle);
        mode.StartAIBattleEvent.Attach(onStartAIBattle);
        mode.EndAIBattleEvent.Attach(onEndAIBattle);
        mode.EndEvent.Attach(onEnd);
    }
Beispiel #5
0
 //
 void Awake()
 {
     Combat.CombatMode mode = Manager.Instance.Object.CombatMode;
     mode.StartUserBattleEvent.Attach(onStartUserBattle);
     mode.StartAIBattleEvent.Attach(onStartAIBattle);
     mode.EndEvent.Attach(onEnd);
     mode.CriticalAttackEvent.Attach(onCriticalAttack);
     mode.AttackEvent.Attach(onAttack);
     mode.CriticalTrickEvent.Attach(onCriticalTrick);
     mode.TrickEvent.Attach(onTrick);
 }
Beispiel #6
0
        public AIPlayer(CombatMode mode, int id, int hp, int mp, int criticalProbability, int attack, int defense, int intellect, int tactic) : base(mode, id)
        {
            CombatPlayer p = Manager.Instance.DT.CombatPlayer[id];

            _orient = p.orient;

            Character c = Manager.Instance.DT.Character[p.characterId];

            _name = c.name;

            _hp = hp;
            _mp = mp;
            _criticalProbability = criticalProbability;
            _attack    = attack;
            _defense   = defense;
            _intellect = intellect;
            _tactic    = tactic;
        }
Beispiel #7
0
        // constructor
        public AIPlayer(CombatMode mode, int id) : base(mode, id)
        {
            CombatPlayer p = Manager.Instance.DT.CombatPlayer[id];

            _orient = p.orient;

            Character c = Manager.Instance.DT.Character[p.characterId];

            _name = c.name;

            _hp = p.hp;
            _mp = p.intellect;
            _criticalProbability = p.criticalProbability;
            _attack    = p.attack;
            _defense   = p.defense;
            _intellect = p.intellect;
            _tactic    = p.tactic;
        }
Beispiel #8
0
 // constructor
 public Player(CombatMode mode, int id)
 {
     _mode = mode;
     _id = id;
 }