Ejemplo n.º 1
0
        void OnCreateRewardTurn(Vector3 startPosition, int count)
        {
            TurnReward turnReward = Instantiate(m_TurnRewardPrefab, transform) as TurnReward;
            // icon position relative to HUD
            Vector3 targetPosition = transform.InverseTransformPoint(m_TurnsIcon.rectTransform.position);

            turnReward.SetFlight(startPosition, targetPosition);

            // add to control list
            AddFlyingTurnReward(turnReward);
        }
Ejemplo n.º 2
0
 void AddFlyingTurnReward(TurnReward flyingReward)
 {
     m_FlyingTurnRewards.Add(flyingReward);
     flyingReward.OnFlightEnd += RemoveFlyingTurnReward;
     Systems.GameState.Instance.FlyingRewardsExist = (m_FlyingTurnRewards.Count > 0);
 }