Exemplo n.º 1
0
        private void OnDestroy()
        {
            State.Destroy();

            Viewer.FollowCamera.SetTarget(null);

            Destroy(_godRay.gameObject);
            _godRay = null;
        }
Exemplo n.º 2
0
        private void OnDestroy()
        {
            Destroy(_godRay.gameObject);
            _godRay = null;

            if (GoalManager.HasInstance)
            {
                GoalManager.Instance.UnregisterGoal(this);
            }
        }
Exemplo n.º 3
0
        private void Awake()
        {
            GoalManager.Instance.RegisterGoal(this);

            gameObject.layer = GoalManager.Instance.GoalLayer;

            _collider           = GetComponent <Collider>();
            _collider.isTrigger = true;

            _godRay = Instantiate(GoalManager.Instance.GoalGodRayPrefab, transform.parent);
            _godRay.SetupGoal();
        }
Exemplo n.º 4
0
        private void Initialize(int id, Bird bird, BirdTypeData birdType)
        {
            Initialize(id);

            name = $"Player {Id}";
            Bird = bird;

            Bird.Initialize(this, birdType);
            Controller.Initialize(this);
            State.Initialize();

            _godRay = Instantiate(PlayerManager.Instance.PlayerGodRayPrefab, transform);
            _godRay.SetupPlayer(this);

            LogInfo();
        }
Exemplo n.º 5
0
 public void Start(Transform tr)
 {
     Tr     = tr;
     godray = tr.GetComponent <GodRay>();
 }