public virtual void OnActivate() { triggleEnable = true; if (golemAni != null) { golemAni.Activate(); } if (golemFx != null) { golemFx.Activate(); } }
private void AttachBuildingModel() { GearParent[] gears = (GearParent[])GameObject.FindObjectsOfType(typeof(GearParent)); foreach (GearParent gear in gears) { if (gear.ID == (uint)clientTrapId) { Transform = gear.transform; GameObject = gear.gameObject; Transform.tag = "Monster"; Debug.Log("CreateBuildingModel Position: " + Transform.position); // motor = GameObject.AddComponent<MogoMotorServer>(); animator = GameObject.GetComponent <Animator>(); ActorMonster ap = GameObject.GetComponent <ActorMonster>(); if (ap == null) { ap = GameObject.AddComponent <ActorMonster>(); } ap.theEntity = this; this.Actor = ap; golem = gear.gameObject.GetComponentInChildren <GolemAnimation>(); golemFx = gear.gameObject.GetComponentInChildren <GolemFx>(); // golem = gear as GolemAnimation; if (golem != null) { golem.Activate(); } if (golemFx != null) { golemFx.Activate(); } BornedHandler(); // base.CreateModel(); } } }
private void AttachBuildingModel() { GearParent[] gears = (GearParent[])GameObject.FindObjectsOfType(typeof(GearParent)); foreach (GearParent gear in gears) { if (gear.ID == (uint)clientTrapId) { Transform = gear.transform; GameObject = gear.gameObject; Transform.tag = "Monster"; LoggerHelper.Debug("CreateBuildingModel Position: " + Transform.position); // motor = GameObject.AddComponent<MogoMotorServer>(); animator = GameObject.GetComponent<Animator>(); ActorMonster ap = GameObject.GetComponent<ActorMonster>(); if (ap == null) ap = GameObject.AddComponent<ActorMonster>(); ap.theEntity = this; this.Actor = ap; golem = gear.gameObject.GetComponentInChildren<GolemAnimation>(); golemFx = gear.gameObject.GetComponentInChildren<GolemFx>(); // golem = gear as GolemAnimation; if (golem != null) golem.Activate(); if (golemFx != null) golemFx.Activate(); BornedHandler(); // base.CreateModel(); } } }