ProjectCow.Cow.Cow C# (CSharp) Method

Cow() public method

public Cow ( Vector2 position, float resistance, GameObjectsManager manager, Random random ) : System
position Vector2
resistance float
manager GameObjectsManager
random System.Random
return System
        public Cow(Vector2 position, float resistance, GameObjectsManager manager, Random random)
            : base(position, resistance, manager, 1, 1)
        {
            this.random = random;
            actionDuration = new TimeSpan();
            spriteEffect = SpriteEffects.None;
            currentMoveSpeed = MOVE_SPEED;
            Width = 80;
            Height = 60;

            moveLeft = false;
            moveRight = false;
            frightened = false;

            int temp = random.Next(5);
            if (temp == 0)
                cowsound = "cow-moo1";
            else if (temp == 1)
                cowsound = "cow-moo2";
            else if (temp == 2)
                cowsound = "cow-moo3";
            else if (temp == 3)
                cowsound = "cow-moo4";
            else if (temp == 4)
                cowsound = "cow-moo5";
        }