Beispiel #1
0
        public static CenterEffect Create(string name, string desc)
        {
            if (string.IsNullOrEmpty(desc))
            {
                return(null);
            }

            CenterEffect effect = AppealUp.Create(name, desc);

            if (effect != null)
            {
                return(effect);
            }

            effect = SkillTriggerProbabilityUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            effect = LifeUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            effect = ConditionalAppealUp.Create(name, desc);
            if (effect != null)
            {
                return(effect);
            }

            throw new FormatException("Unknown effect description: " + desc);
        }
 // Start is called before the first frame update
 void Start()
 {
     gameManagerScript = GameObject.Find("GameManager").GetComponent <MainGameManagerScript>();
     lifeScript        = GameObject.Find("GameManager").GetComponent <LifeUp>();
     onScreenUI        = GameObject.Find("OnScreenUI").GetComponent <OnScreenUI>();
     drop = false;
 }