public virtual void init(int type, Vector2 minPos, Vector2 maxPos) { MyUnityTools.dflt(ref lm, "LevelController"); //pseudo-constructor //initialize a newly spawned ghost from script Type = type; transform.position = new Vector2(UnityEngine.Random.Range(minPos.x, maxPos.x), UnityEngine.Random.Range(minPos.y, maxPos.y)); }
public Text goScoreText; //GameOver... void Awake() { Debug.Log("Het is wel aan het starten!"); //initialize the elements array elements = GetComponentsInChildren <Graphic>(); //initize special elemets; its repeat code I know, its a gamejam get off my back MyUnityTools.dflt(ref scoreText, "ScoreText"); MyUnityTools.dflt(ref typeIcon, "TypeIcon"); MyUnityTools.dflt(ref timerText, "TimerText"); MyUnityTools.dflt(ref gameOver, "GameOver"); MyUnityTools.dflt(ref goScoreText, "GO_ScoreText"); MyUnityTools.dflt(ref splash, "Splash"); }
// Use this for initialization void Start() { Debug.Log("Het is wel aan het starten!"); spawnGhosts(startingGhosts); MyUnityTools.dflt(ref hud, "TopBar"); MyUnityTools.dflt(ref pointsPopup, "PointsPopup"); Debug.Log("Het is nog steds aan het starten!"); //because gamejam; typeIcons = new Sprite[baseNumTypes] { policeSprt, //Resources.Load<Sprite>("Sprites/ghost_police_hat"), //cyan //0 magicSprt, //1 construcSprt, //2 armySprt, //3 chefSprt, //4 cowSprt //5 }; reset(); }
void Awake() { //ignor that this is in Dutch... //Debug.Log("Het is wel aan het starten!"); //defaults for variables MyUnityTools.dflt(ref text, "SplashText"); MyUnityTools.dflt(ref image, "SplashImage"); /* * } * * void Start(){ */ //become invisible //Debug.Log("Turning splash elements off."); image.gameObject.SetActive(false); text.gameObject.SetActive(false); //Debug.Log("Splash elemenents are " + image.gameObject.activeSelf.ToString() + "," + text.gameObject.activeSelf.ToString()); }
protected void Awake() { MyUnityTools.dflt(ref lm, "LevelController"); }
void Start() { MyUnityTools.dflt(ref mainButtons, "MainButtons"); MyUnityTools.dflt(ref credits, "Credits"); }