public void CheckAndClearDestroyedTarget(IDestroyedTarget target)
 {
     if (thisDestroyedTarget == target)
     {
         thisDestroyedTarget = null;
     }
 }
예제 #2
0
        void DrawDestroyedTargetByShootingTarget(Rect rect)
        {
            IStaticShootingTarget[] sTargets = thisStaticShootingTargetReserve.GetStaticShootingTargets();

            string result = "";

            foreach (IStaticShootingTarget sTarget in sTargets)
            {
                result += "sTarget #" + sTarget.GetIndex().ToString() + ", ";
                IDestroyedTarget dTarget = sTarget.GetDestroyedTarget();
                if (dTarget == null)
                {
                    result += "null";
                }
                else
                {
                    result += dTarget.GetIndex();
                }
                result += "\n";
            }
            GUI.Label(
                rect,
                result
                );
        }
        public void RegisterTargetDestroyed(IShootingTarget target, bool isRare)
        {
            if (!thisGameplayIsEnded)
            {
                float heat = target.GetHeatBonus();
                thisHeatManager.AddHeat(heat);

                int score = target.GetDestructionScore();
                thisScoreManager.AddScore(score);

                if (isRare)
                {
                    int targetTier     = target.GetTier();
                    int currencyGained = CalculateCurrencyGained(targetTier);
                    thisCurrencyManager.AddGainedCurrency(currencyGained);

                    IDestroyedTarget destroyedTarget = target.GetDestroyedTarget();
                    destroyedTarget.PopText(
                        currencyGained.ToString(),
                        new Color(.8f, .2f, .9f)
                        );
                }
            }
        }
 public void SetDestroyedTarget(IDestroyedTarget target)
 {
     thisDestroyedTarget = target;
 }