Пример #1
0
    private void Start()
    {
        player    = SessionCache.Cache.CurrentPlayer;
        spaceship = new Spaceship(new SpaceshipType(), spaceshipGameObject);
        /// send message here to set up amount of health in other script. If we want to controll this parameter from this class,
        /// we can add another message from damageController class.
        SendMessage("setHealth", spaceship.Health, SendMessageOptions.DontRequireReceiver);

        levelInspector = GlobalManagerInstance.GetLevelInspector();
    }
    //Override OnInspectGUI mehtod which is called everytime the inspector GUI is drawn
    public override void OnInspectorGUI()
    {
        //Omitting this line will make inspector GUI void of any previous information making it useless
        //Draws the Basic Inspector GUI
        //base.OnInspectorGUI();

        //Get access to LevelInspector object
        LevelInspector levelScript = (LevelInspector)target;

        //Information to be shown : Experience and level
        //Create two integers fields for this using EditorGUILayout
        //Proveide name value pairs for all fields
        //Also allow modification to field values from the editor
        levelScript.experience = EditorGUILayout.IntField("Experience", levelScript.experience);
        //Display level field as read-only
        EditorGUILayout.LabelField("Level", levelScript.Level.ToString());
    }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        levelInspector = GlobalManagerInstance.GetLevelInspector();

        crawling = true;
        creds   += "In the distant future . . . \n";
        creds   += " (well not really that distant)\n";
        creds   += "Earth is visited by \n";
        creds   += "extraterrestrial beings from \n";
        creds   += "a galaxy far, far away. \n";
        creds   += "The people of Earth welcome \n";
        creds   += "these beings, hoping to learn\n";
        creds   += "more about the universe. But \n";
        creds   += "shortly after making first \n";
        creds   += "contact with the aliens,\n";
        creds   += "THIS happened\n";
        gameObject.guiText.text = creds;
    }
Пример #4
0
 void Start()
 {
     levelInspector = GlobalManagerInstance.GetLevelInspector();
     text           = levelInspector.GetCurrentBriefingText();
 }
Пример #5
0
 void Start()
 {
     Screen.showCursor = true;
     levelInspector    = GlobalManagerInstance.GetLevelInspector();
 }
Пример #6
0
 void Start()
 {
     levelInspector = GlobalManagerInstance.GetLevelInspector();
 }