예제 #1
0
 public void ReleaseLifeBalloon(LifeSpawnBeacon beacon)
 {
     var balloon = beacon.Balloon;
     balloon.transform.parent = null;
     var behaviour = balloon.GetComponent<EnvironmentEntityBehaviour>();
     behaviour.QueueController("float", new BalloonFloatingController(behaviour));
     behaviour.MoveTo(behaviour.transform.position + new Vector3(0, 1000, 0), false);
 }
예제 #2
0
        public void SpawnLifeBalloon(LifeSpawnBeacon beacon)
        {
            var host = beacon.UnityGameObject;

            var entity = ResourceManager.CreateInstance<GameObject>("Environment/Balloon");
            entity.transform.parent = host.transform;
            entity.transform.localPosition = Vector3.zero;
            entity.transform.localRotation = Quaternion.identity;
        }
 private void InitLifeBeacons()
 {
     var nodes = GameObject.FindGameObjectsWithTag("life_node");
     for (int i = 0; i < entityManager.Player.MaxLife; i++) {
         var node = nodes[i];
         var beacon = new LifeSpawnBeacon(node);
         lifeBeacons.Add(beacon);
     }
     // this must be here, we need the player to do this
     SetPlayerHealth(entityManager.Player.MaxLife);
 }