コード例 #1
0
 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
                );
        }
コード例 #3
0
        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)
                        );
                }
            }
        }
コード例 #4
0
 public void SetDestroyedTarget(IDestroyedTarget target)
 {
     thisDestroyedTarget = target;
 }