提交
This commit is contained in:
@@ -126,7 +126,7 @@ namespace Rewired.Demos {
|
||||
|
||||
void Awake() {
|
||||
|
||||
pointer = (GameObject)Instantiate(pointerPrefab);
|
||||
pointer = (GameObject)GameObject.Instantiate(pointerPrefab);
|
||||
pointer.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale);
|
||||
|
||||
#if UNITY_5_PLUS
|
||||
@@ -190,11 +190,11 @@ namespace Rewired.Demos {
|
||||
}
|
||||
|
||||
void CreateClickEffect(Color color) {
|
||||
GameObject go = (GameObject)Instantiate(clickEffectPrefab);
|
||||
GameObject go = (GameObject)GameObject.Instantiate(clickEffectPrefab);
|
||||
go.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale);
|
||||
go.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(mouse.screenPosition.x, mouse.screenPosition.y, distanceFromCamera));
|
||||
go.GetComponentInChildren<SpriteRenderer>().color = color;
|
||||
Destroy(go, 0.5f);
|
||||
Object.Destroy(go, 0.5f);
|
||||
}
|
||||
|
||||
// Callback when the screen position changes
|
||||
|
||||
Reference in New Issue
Block a user