Beispiel #1
0
        public Target GetPrefab(TargetData.Type type)
        {
            Target target = Prefabs.Find(prefab => prefab.Type == type).Target;

            if (target == null)
            {
                throw new System.Exception("No prefab for this target type is set");
            }
            return(target);
        }
Beispiel #2
0
        public Sprite GetSprite(TargetData.Type type)
        {
            Sprite targetSprite = Sprites.Find(sprite => sprite.Type == type).Sprite;

            if (targetSprite == null)
            {
                throw new System.Exception("No sprite for this target type is set");
            }
            return(targetSprite);
        }