Example #1
0
        public override void Start()
        {
            this.Sprite = this.Content.Load <Texture2D>("Sprites/player/prototype_character");
            this.AsepriteDefinitions = this.Content.Load <AsepriteDefinitions>("Sprites/player/prototype_character_json");
            this.AsepriteAnimation   = new AsepriteAnimation(this.AsepriteDefinitions);

            this.SpriteColor = Color.Red;

            this.TextureSize = new Vector2(64, 64);
            this._bodySize   = new Vector2(10, 32);

            this.SetBoxCollision(this.World);
            this.CBody.Tag      = "Knight";
            this.CBody.BodyType = BodyType.Dynamic;
            this.CBody.SetCollidesWith(Category.Cat1);
            this.CBody.SetFriction(1);

            this.DontCollisionWithTag.Add("Player");
            this.DontCollisionWithTag.Add("Knight");
            this.DontCollisionWithTag.Add("Troll");

            this.VigiliantModeActive = true;
        }
Example #2
0
        public override void Start()
        {
            this.Sprite = this.Content.Load <Texture2D>("Sprites/Enemies/troll");
            this.AsepriteDefinitions = this.Content.Load <AsepriteDefinitions>("Sprites/Enemies/troll_info");
            this.AsepriteAnimation   = new AsepriteAnimation(this.AsepriteDefinitions);

            this.SpriteColor = Color.Red;

            this.TextureSize = new Vector2(64, 64);
            this._bodySize   = new Vector2(10, 32);

            this.SetBoxCollision(this.World);
            this.CBody.Tag      = "Troll";
            this.CBody.BodyType = BodyType.Dynamic;
            this.CBody.SetCollidesWith(Category.Cat1);
            this.CBody.SetFriction(1);

            this.DontCollisionWithTag.Add("Player");
            this.DontCollisionWithTag.Add("Knight");
            this.DontCollisionWithTag.Add("Troll");

            _right = false;
            this.CurrentAnimation = AnimationType.BORN;
        }