Beispiel #1
0
    /// <summary>
    /// 激活行为.
    /// </summary>
    public override void Active()
    {
        base.Active();
        if (hitAnim.Length > 0)
        {
            hero.DispatchEvent(ControllerCommand.CrossFadeAnimation, hitAnim);
        }
        isFinish             = false;
        action               = new ActionThrowUp(hero);
        action.beginPosition = hero.Position;
        action.endPosition   = KingSoftCommonFunction.NearPosition(hero.Position);
        KParams kParams = KConfigFileManager.GetInstance().GetParams();

        action.height        = kParams.HitHeight;
        action.changeForward = false;

        action.type      = ActionThrowUp.ThrowUpType.TIME;
        action.totalTime = time;
        action.Active();

        if (hero.property.isMainHero)
        {
            hero.DispatchEvent(ControllerCommand.HERO_MOVE);
        }
    }
Beispiel #2
0
    //

    public ActionRush(SceneEntity hero) : base("ActionRush", hero)
    {
        action = new ActionThrowUp(hero);
    }
Beispiel #3
0
 public ActionJump(SceneEntity hero) : base("ActionJump", hero)
 {
     action = new ActionThrowUp(hero);
 }
Beispiel #4
0
 public ActionMonsterDie(SceneEntity hero) : base("ActionDie", hero)
 {
     jump = new ActionThrowUp(hero);
     jump.changeForward = false;
     isDead             = true;
 }