private void Start()
        {
            ComponentLocator.Register(this);

            Spaceship = GetComponent <SpaceshipController>();

            EventManager.DispatchEvent(ConstantEventsName.ON_PLAYER_SPACESHIP_CREATE, this);
        }
        protected override void Awake()
        {
            base.Awake();

            if (component == null)
            {
                component = this;
            }
            ComponentLocator.Register(component);
        }
        protected void Awake()
        {
            DontDestroyOnLoad(gameObject);

            if (component == null)
            {
                component = this;
            }
            ComponentLocator.Register(component);

            CustomAwake();
        }
Exemple #4
0
        private void OnEnable()
        {
            if (camera == null)
            {
                camera = GetComponent <Camera>();
            }

            baseOffset = camera?.orthographicSize ?? 0.0f;

            ComponentLocator.Register(this);

            EventManager.DispatchEvent(ConstantEventsName.ON_GAMEPLAY_CAMERA_ENABLE, true);
        }
Exemple #5
0
 private static void Initialize()
 {
     ComponentLocator.Register(new GameObject("[Instance] Updater").AddComponent <Updater>());
 }