Don’t Fall Asheep Progress 2013-04-29

Categories: Don't fall asheep, Game, Unity

Only had a very short time to work on the project this last week, so only added very simple movement for the sheep based on global position and Math.Sin, not pretty but it works and still, it’s only for prototyping.

 void Update()
        Vector3 v3 = transform.position;
        v3.x += 0.05f;
        if (v3.x >= -1f && v3.x < 1f)
            v3.y += (Mathf.Cos((v3.x+1.0f)/2.0f * 3.1415f))*0.125f;

        if (v3.x > 5.0f)
            hitsLeft = 4;
            v3.x = -10;
            v3.y = 0.5f;
        transform.position = v3;

The sheep not getting hit, will have their position and hit count reset and reused when exiting the screen.

Don't Fall Asheep Progress ScreenShot 003
Don’t Fall Asheep Progress ScreenShot 003


– Henning


    Leave a Reply

    Your email address will not be published. Required fields are marked *