-
-
Save monry/9638696349dd76436d02dfe877541822 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Mole : MonoBehaviour { | |
void Start () { | |
} | |
void Update () { | |
this.transform.Translate (0, 0.08f, 0); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoleGenerator : MonoBehaviour { | |
Mole mole1; | |
Mole mole2; | |
Mole mole3; | |
public GameObject molePrefab; | |
void Start () { | |
this.mole1 = Instantiate(this.molePrefab).GetComponent<Mole>(); | |
mole1.transform.position = new Vector3 (-6.02f, -3.51f, 0); | |
this.mole2 = Instantiate(this.molePrefab).GetComponent<Mole>(); | |
mole2.transform.position = new Vector3 (0.2f, -4.31f, 0); | |
this.mole3 = Instantiate(this.molePrefab).GetComponent<Mole>(); | |
mole3.transform.position = new Vector3 (6.13f, -2.16f, 0); | |
} | |
void Update () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment