Ejemplo n.º 1
0
    public void set_state(SByte v)
    {
        state = v;
        if (hudinfos != null)
        {
            hudinfos.set_state(v);
        }

        if (gameEntity != null)
        {
            switch (state)
            {
            case 0:
                gameEntity.playIdleAnimation();
                break;

            case 1:
                gameEntity.playDeadAnimation();
                break;

            case 2:
                gameEntity.playIdleAnimation();
                break;

            case 3:
                gameEntity.playIdleAnimation();
                break;

            default:
                gameEntity.playIdleAnimation();
                break;
            }
            ;
        }
    }
    public void set_state(SByte v)
    {
        state = v;
        //if(hudinfos != null)
        if (!System.Object.ReferenceEquals(hudinfos, null))
        {
            hudinfos.set_state(v);
        }

        //if(gameEntity != null)
        if (!System.Object.ReferenceEquals(gameEntity, null))
        {
            switch (state)
            {
            case 0:
                gameEntity.playIdleAnimation();
                break;

            case 1:
                gameEntity.playDeadAnimation();
                break;

            case 2:
                gameEntity.playIdleAnimation();
                break;

            case 3:
                gameEntity.playIdleAnimation();
                break;

            default:
                gameEntity.playIdleAnimation();
                break;
            }
            ;
        }
    }