Example #1
0
 // Use this for initialization
 void Start()
 {
     _body   = GetComponent <Rigidbody2D>();
     _player = GetComponent <Player>();
     ObjectChecker.CheckNullity(_body, "RigidBody2D not found for Player");
     ObjectChecker.CheckNullity(_player, "Player not found");
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        _economyManager = FindObjectOfType <EconomyManager>();
        _text           = GetComponent <Text>();

        ObjectChecker.CheckNullity(_economyManager, "Economy manager not found");
        ObjectChecker.CheckNullity(_text, "Component Text not found");
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        _buildings      = new Dictionary <Vector3, Building>();
        _economyManager = FindObjectOfType <EconomyManager>();
        _mapInfos       = FindObjectOfType <MapInfosManager>();

        ObjectChecker.CheckNullity(_economyManager, "Economy manager not found");
        ObjectChecker.CheckNullity(_mapInfos, "Map infos not found");
    }
Example #4
0
    void Start()
    {
        _mapInfosManager = GetComponentInParent <MapInfosManager>();
        _terrain         = GetComponent <Terrain>();
        ObjectChecker.CheckNullity(_mapInfosManager, "MapInfosManager not found");
        ObjectChecker.CheckNullity(_terrain, "Terrain component not found");

        ResizeTerrain();
        ManageCaseTextureAndHeight();
    }
Example #5
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        _camera = GetComponent <Camera>();
        DontDestroyOnLoad(_camera);
        ObjectChecker.CheckNullity(player, "Camera can't find the Player");
    }
Example #6
0
 // Runs before the Start()
 void Awake()
 {
     _dialogSound = GetComponent <AudioSource>();
     ObjectChecker.CheckNullity(_dialogSound, "Dialog sound not found");
 }