Example #1
0
        protected virtual void Create()
        {
            Instance = Instantiate(Base.LevelData.Graphic.Prefab, transform);

            Instance.name = Base.LevelData.Graphic.Prefab.name;

            Tools.Layer.Set(Instance, Proponent.Layer);

            Instance.transform.localPosition    = Base.LevelData.Graphic.Position;
            Instance.transform.localEulerAngles = Vector3.zero;

            UpdateState();

            var script = Instance.GetComponent <EntityHealthActivation>();

            Modules.Setup(script, Base);
        }
        public override void Init()
        {
            base.Init();

            for (int i = 0; i < Selection.Count; i++)
            {
                if (Selection[i] == null)
                {
                    continue;
                }

                var instance = ProponentAbility.Create(this, Selection[i]);

                Elements.Add(instance);

                Modules.Setup(instance, this);
            }
        }