Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMPUT 250 W24 Lab 3/Assets/DVDLogo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

public class DVDLogo : MonoBehaviour
{
SpriteRenderer sprite;
//Speed it moves at
public float speed = 3;

public float speed = 9;

//Bounds of the screen (could get these with camera bounds but we can do this since it's a fixed camera)
public float X_Max = 5, Y_Max = 4;
Expand All @@ -20,6 +22,10 @@ void Start()
direction = new Vector3(Random.Range(-1f,1f), Random.Range(-1f,1f));
direction.Normalize();

sprite = GetComponentInChildren<SpriteRenderer>();

//sprite = GetComponent<SpriteRenderer>();

}

private void FlipDirectionX(){
Expand Down Expand Up @@ -60,5 +66,7 @@ void Update()
}

transform.position += direction*Time.deltaTime*speed;

sprite.color = new Color(Random.Range(0f,1f),Random.Range(0f,1f),Random.Range(0f,1f));
}
}
6 changes: 3 additions & 3 deletions CMPUT 250 W24 Lab 3/Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Transform:
m_GameObject: {fileID: 755472557}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.2, y: 0.2, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 421997421}
m_RootOrder: 0
Expand Down Expand Up @@ -321,7 +321,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 6e7069a7db07f489a87c0797b3ff2165, type: 3}
m_Sprite: {fileID: 21300000, guid: 0d953e8ba7831324885ed58af55045f3, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
Expand Down Expand Up @@ -566,7 +566,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: This is a bouncing ball
m_Text: These are bouncing fish
--- !u!222 &2098954804
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down
Binary file added CMPUT 250 W24 Lab 3/Assets/spriteOutput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions CMPUT 250 W24 Lab 3/Assets/spriteOutput.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.