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 ); }
void ActivateDestroyedTargetAtDrawnShootingTarget() { if (!thisStaticTargetsAreSet) { SetStaticShootingTargetsAtSpawnPoints(); } if (!thisIndexPoolIsSet) { SetIndexPool(); } IStaticShootingTarget[] targets = thisStaticShootingTargetReserve.GetStaticShootingTargets(); int index = thisIndexPool.Draw(); IStaticShootingTarget target = targets[index]; thisDestroyedTargetReserve.ActivateDestoryedTargetAt(target); }
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 ); }