Exemplo n.º 1
0
        void DrawShootingTargetByDestroyedTarget(Rect rect)
        {
            IDestroyedTarget[] destroyedTargets = thisDestroyedTargetReserve.GetTargets();

            string result = "";

            foreach (IDestroyedTarget dTarget in destroyedTargets)
            {
                result += "dTarget #" + dTarget.GetIndex().ToString() + ", ";
                IShootingTarget sTarget = dTarget.GetShootingTarget();
                if (sTarget == null)
                {
                    result += "null";
                }
                else
                {
                    result += sTarget.GetIndex().ToString();
                }
                result += "\n";
            }
            GUI.Label(
                rect,
                result
                );
        }
Exemplo n.º 2
0
        void DrawTargetsBySpawnPoints(Rect rect)
        {
            if (thisSystemIsReady)
            {
                IStaticTargetSpawnPoint[] spawnPoints = CollectStaticTargetSpawnPonints();
                string result       = "";
                int    indexOfPoint = 0;
                foreach (IStaticTargetSpawnPoint point in spawnPoints)
                {
                    IShootingTarget assignedTarget = point.GetSpawnedTarget();
                    result +=
                        "spawnPoint #" + indexOfPoint.ToString() + ": ";
                    if (assignedTarget == null)
                    {
                        result += " null ";
                    }
                    else
                    {
                        result += "target # " + assignedTarget.GetIndex().ToString();
                    }

                    result += "\n";
                    indexOfPoint++;
                }
                GUI.Label(
                    rect,
                    result
                    );
            }
        }