Exemplo n.º 1
0
        protected override void Awake()
        {
            base.Awake();

            AttachedPlanets = new List<Planet>();

            if (_parentTransform != null)
                SelfPlanet = _parentTransform.GetComponentInChildren<Planet>();
        }
Exemplo n.º 2
0
        protected override void Awake()
        {
            base.Awake();

            Planet = GetComponentInChildren<Planet>();
            Orbit = GetComponentInChildren<Orbit>();

            InitAttachOrbit();

            Planet.OnTriggerEnterAction += OnPlanetTriggerEnter;
            Planet.OnTriggerExitAction += OnPlanetTriggerExit;
            Planet.OnTriggerStayAction += OnPlanetTriggerStay;
        }
Exemplo n.º 3
0
Arquivo: Orbit.cs Projeto: ai-ry/orbit
 public void RemoveAttachedPlanet(Planet planet)
 {
     _attachedPlanets.Remove(planet);
     if (planet.Controller.AttachOrbit == this)
         planet.Controller.AttachOrbit = null;
 }
Exemplo n.º 4
0
Arquivo: Orbit.cs Projeto: ai-ry/orbit
 public void AddAttachedPlanet(Planet planet)
 {
     _attachedPlanets.Add(planet);
     planet.Controller.AttachOrbit = this;
 }