Exemplo n.º 1
0
    public void SetHeroState(HeroState state, params object[] param)
    {
        switch (state)
        {
        case HeroState.Idle:
            PlayAnim(AnimParamType.Bool, "run", false);
            break;

        case HeroState.MoveTo:
            this.aimPos = (Vector3)param[0];
            PlayAnim(AnimParamType.Bool, "run", true);
            break;

        case HeroState.Attack:
            selectEnemyUnit = param[0] as Unit;
            break;

        case HeroState.PutEye:
            this.aimPos = (Vector3)param[0];
            PlayAnim(AnimParamType.Bool, "run", true);
            break;

        case HeroState.SkillMoveTo:
            this.aimPos  = (Vector3)param[0];
            currentSkill = param[2] as SkillCommoand;
            PlayAnim(AnimParamType.Bool, "run", true);
            break;

        default:
            break;
        }
        heroState = state;
    }
Exemplo n.º 2
0
 public SkillMoveToCommoand(HeroUnit unit, Vector3 pos, float distance, SkillCommoand commoand) : base(unit, pos)
 {
     this.distance = distance;
     this.commoand = commoand;
 }