Пример #1
0
    protected override bool Init()
    {
        num = Num;

        PlaySelfEffect();

        type = (AntiType)((int)BaseValue);
        switch (type)
        {
        case AntiType.AntiDizzy:
            owner.EnableAntiDizzy();
            break;

        case AntiType.AntiFanJi:
            owner.EnableAntiFanJi();
            break;

        case AntiType.AntiDizzyFanJi:
            owner.EnableAntiDizzy();
            owner.EnableAntiFanJi();
            break;
        }

        return(true);
    }
Пример #2
0
        public void BuyAnticorps(AntiType type)
        {
            bool ok = false;

            switch (type)
            {
            case AntiType.Normal:
                if (sucre >= 20)
                {
                    ok     = true;
                    sucre -= 20;
                }
                break;

            case AntiType.Neighbour:
                if (sucre >= 20 && gras >= 10)
                {
                    ok     = true;
                    sucre -= 20;
                    gras  -= 10;
                }

                break;

            case AntiType.Leader:
                if (sucre >= 30 && gras >= 20 && vitC >= 10)
                {
                    ok     = true;
                    sucre -= 30;
                    gras  -= 20;
                    vitC  -= 10;
                }
                break;
            }

            if (ok)
            {
                _instance.AddAntiCorps(type, _instance.None);
            }
        }
Пример #3
0
        public Anticorps(Vector2 position, AntiType type, BodyPart part = null) : base(Assets.PixelB, position)
        {
            switch (type)
            {
            case AntiType.Normal:
                Texture = Utils.CreateTexture(40, 40, Color.Red);
                break;

            case AntiType.Neighbour:
                Texture = Utils.CreateTexture(40, 40, Color.Yellow);
                break;

            case AntiType.Leader:
                Texture = Utils.CreateTexture(40, 40, Color.Blue);
                break;
            }
            _hitbox       = new Rectangle((int)Position.X, (int)Position.Y, Texture.Width, Texture.Height);
            this.type     = type;
            secondTexture = Utils.CreateContouringTexture(40, 40, Color.White);
            End           = false;
            ActualPart    = part;
        }
Пример #4
0
    protected override bool Init()
    {
        num = Num;

        PlaySelfEffect();

        type = (AntiType)((int)BaseValue);
        switch (type)
        {
            case AntiType.AntiDizzy:
                owner.EnableAntiDizzy();
                break;
            case AntiType.AntiFanJi:
                owner.EnableAntiFanJi();
                break;
            case AntiType.AntiDizzyFanJi:
                owner.EnableAntiDizzy();
                owner.EnableAntiFanJi();
                break;
        }

        return true;
    }