Example #1
0
    public void Anim_Attack()
    {
        ObjectCreature obj = SceneObjectManager.GetInstance().GetSceneObjectByGameObject(this.gameObject);

        if (obj is ObjectHero)
        {
            ObjectHero hero    = obj as ObjectHero;
            string[]   Actions = hero.GetSpellNormal().GetSpellRow().getAction();
            RandomAttack(Actions);
        }
        else
        {
            ObjectMonster monster = obj as ObjectMonster;
            string[]      Actions = monster.GetSpellNormal().GetSpellRow().getAction();
            RandomAttack(Actions);
        }
    }