Ejemplo n.º 1
0
 public override bool EnbaleEnterAction(ISwitchMissionContext context)
 {
     if (this.DoOnLoad)
     {
         Debug.Log($"Action.EnbaleEnterAction: {this}是立即执行的行动");
         return(true);
     }
     Debug.Log($"Action.EnbaleEnterAction: {this}直接开始出现稻草人吧");
     return(true);
 }
Ejemplo n.º 2
0
    public override bool IsCompleted(ISwitchMissionContext context)
    {
        --countDown;
        if (countDown == 0)
        {
            return(true);
        }

        Debug.Log("玩家攻击了?不存在的!");
        return(false);
    }
    public override bool IsCompleted(ISwitchMissionContext context)
    {
        if (excutedCount > 0)
        {
            Debug.Log("CompletedSwitchWeaponCondition.IsCompleted: 玩家居然会切换武器???");
            return(true);
        }

        ++excutedCount;
        Debug.Log("CompletedSwitchWeaponCondition.IsCompleted: 玩家完成了切换武器?不存在的!");
        return(false);
    }
Ejemplo n.º 4
0
    public void Execute(ISwitchMissionContext context)
    {
        for (int i = 0; i < this.actions.Count; i++)
        {
            if (this.actions[i].EnableExitAction(context))
            {
                return;
            }

            if (this.actions[i].DoOnLoad || this.actions[i].EnbaleEnterAction(context))
            {
                this.actions[i].Do(context);
            }
        }

        if (this.completedCondition.IsCompleted(context))
        {
            context.SwitchMission(this);
        }
    }
Ejemplo n.º 5
0
 public override void Do(ISwitchMissionContext context)
 {
     Debug.Log("Action.Do: 稻草人出现中");
 }
Ejemplo n.º 6
0
 public override bool EnableExitAction(ISwitchMissionContext context)
 {
     Debug.Log("Action.EnableExitAction: 稻草人还没升到最高处,不退出该行动");
     return(false);
 }
 public override void Do(ISwitchMissionContext context)
 {
     Debug.Log("重砍才能破坏的稻草人升上来中");
 }
 public override bool EnbaleEnterAction(ISwitchMissionContext context)
 {
     Debug.Log("既然进来了就开始吧");
     return(true);
 }
    public override bool EnableExitAction(ISwitchMissionContext context)
    {
        Debug.Log("重砍才能破坏的稻草人还没升上来");

        return(false);
    }
Ejemplo n.º 10
0
 public abstract void Do(ISwitchMissionContext context);
Ejemplo n.º 11
0
 public abstract bool EnbaleEnterAction(ISwitchMissionContext context);
Ejemplo n.º 12
0
 public abstract bool EnableExitAction(ISwitchMissionContext context);
 public abstract bool IsCompleted(ISwitchMissionContext context);