コード例 #1
0
ファイル: Ghost.cs プロジェクト: sowrd299/SpringGameJam2016
 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));
 }
コード例 #2
0
ファイル: TopBar.cs プロジェクト: sowrd299/SpringGameJam2016
    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");
    }
コード例 #3
0
 // 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();
 }
コード例 #4
0
ファイル: Splash.cs プロジェクト: sowrd299/SpringGameJam2016
    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());
    }
コード例 #5
0
 protected void Awake()
 {
     MyUnityTools.dflt(ref lm, "LevelController");
 }
コード例 #6
0
 void Start()
 {
     MyUnityTools.dflt(ref mainButtons, "MainButtons");
     MyUnityTools.dflt(ref credits, "Credits");
 }