コード例 #1
0
ファイル: PlayableAgent.cs プロジェクト: molvin/LD48
 public override void Tick(int CurrentFrame, bool Scrum)
 {
     AbilitySystem.IsScrumming = Scrum;
     TypeTag Action = Conversion.LDToGameplayTag(TimeLine[CurrentFrame].action);
     int X = GameStateManager.Instance.GetGridManager().xWidth;
     Vector2Int TargetPos = new Vector2Int(TimeLine[CurrentFrame].cell % X, TimeLine[CurrentFrame].cell / X);
     AbilitySystem.CurrentTarget = TargetPos;
     AbilitySystem.TryActivateAbilityByTag(Action);
     AbilitySystem.Tick();
     AbilitySystem.IsScrumming = false;
 }
コード例 #2
0
    public override void Tick(int _Frame, bool Scrum)
    {
        if (!IsAlive)
        {
            return;
        }

        (System.Type, Vector2Int)Action = SelectAction();

        AbilitySystem.IsScrumming   = Scrum;
        AbilitySystem.CurrentTarget = Action.Item2;
        AbilitySystem.TryActivateAbilityByTag(Action.Item1);
        AbilitySystem.Tick();
        AbilitySystem.IsScrumming = false;
    }