Esempio n. 1
0
        void DrawTargetByPopUI(Rect rect)
        {
            UnityBase.IPopUI[] uis    = thisPopUIReserve.GetPopUIs();
            string             result = "";

            foreach (UnityBase.IPopUI ui in uis)
            {
                result += "ui #" + ui.GetIndex().ToString() + ", ";
                UnityBase.ISceneObject obj = ui.GetSceneObject();
                if (obj != null)
                {
                    IStaticShootingTarget target = (IStaticShootingTarget)obj;
                    result += "target# " + target.GetIndex().ToString();
                }
                else
                {
                    result += "null";
                }
                result += "\n";
            }
            GUI.Label(
                rect,
                result
                );
        }
Esempio n. 2
0
        void ActivateDestroyedTargetAtDrawnShootingTarget()
        {
            if (!thisStaticTargetsAreSet)
            {
                SetStaticShootingTargetsAtSpawnPoints();
            }
            if (!thisIndexPoolIsSet)
            {
                SetIndexPool();
            }
            IStaticShootingTarget[] targets = thisStaticShootingTargetReserve.GetStaticShootingTargets();

            int index = thisIndexPool.Draw();

            IStaticShootingTarget target = targets[index];

            thisDestroyedTargetReserve.ActivateDestoryedTargetAt(target);
        }
Esempio n. 3
0
        void ActivatePopUIAtDrawnShootingTarget()
        {
            if (!thisStaticTargetsAreSet)
            {
                SetStaticShootingTargetsAtSpawnPoints();
            }
            if (!thisIndexPoolIsSet)
            {
                SetIndexPool();
            }

            IStaticShootingTarget[] targets = thisStaticShootingTargetReserve.GetStaticShootingTargets();
            int index = thisIndexPool.Draw();
            IStaticShootingTarget target = targets[index];

            thisPopUIReserve.PopText(
                target,
                "WTF",
                Color.white
                );
        }