Esempio n. 1
0
        private void Create(ShipBehaviour ship)
        {
            if (ship.OverFlowCheck())
            {
                ship.StartFreePlane(ship);
                return;
            }
            var plane          = Instantiate(prefabPlane, transform.position + new Vector3(.5f, .5f, 0), Quaternion.identity);
            var planeBehaviour = plane.GetComponent <PlaneBehaviour>();

            planeBehaviour.Initialize(ship, configs);
            ship.AddPlane(planeBehaviour);
            OnNewPlane?.Invoke(planeBehaviour);
            _input.OnHuntBegin += planeBehaviour.StartHunt;
        }
 protected void RaiseNewLayer(int newLayerIndex, double newLayerHeight = 0)
 {
     layerIndex = newLayerIndex;
     OnNewPlane?.Invoke(newLayerHeight, newLayerIndex);
 }