private void CreateEye() { if (this.actorRoot && this.bEyeObj) { this.actorRoot.get_handle().ObjLinker.CanMovable = false; Singleton <GameObjMgr> .get_instance().AddActor(this.actorRoot); EyeWrapper eyeWrapper = this.actorRoot.get_handle().ActorControl as EyeWrapper; if (eyeWrapper != null) { eyeWrapper.LifeTime = this.EyeLifeTime; } if (this.actorRoot.get_handle().HorizonMarker != null) { this.actorRoot.get_handle().HorizonMarker.SightRadius = this.sightRadius; } if (this.actorRoot.get_handle().SMNode != null) { VCollisionSphere vCollisionSphere = new VCollisionSphere(); vCollisionSphere.Born(this.actorRoot); vCollisionSphere.Pos = VInt3.zero; vCollisionSphere.Radius = 500; vCollisionSphere.dirty = true; vCollisionSphere.ConditionalUpdateShape(); this.actorRoot.get_handle().SMNode.Attach(); } } }
private void CreateEye() { if ((this.actorRoot != 0) && this.bEyeObj) { this.actorRoot.handle.ObjLinker.CanMovable = false; Singleton <GameObjMgr> .instance.AddActor(this.actorRoot); EyeWrapper actorControl = this.actorRoot.handle.ActorControl as EyeWrapper; if (actorControl != null) { actorControl.LifeTime = this.EyeLifeTime; } if (this.actorRoot.handle.HorizonMarker != null) { this.actorRoot.handle.HorizonMarker.SightRadius = this.sightRadius; } if (this.actorRoot.handle.SMNode != null) { VCollisionSphere sphere = new VCollisionSphere(); sphere.Born((ActorRoot)this.actorRoot); sphere.Pos = VInt3.zero; sphere.Radius = 500; sphere.dirty = true; sphere.ConditionalUpdateShape(); this.actorRoot.handle.SMNode.Attach(); } } }
private void CreateEye(SkillUseContext skillContext) { if (this.actorRoot && this.bEyeObj) { this.actorRoot.handle.ObjLinker.CanMovable = false; Singleton <GameObjMgr> .instance.AddActor(this.actorRoot); EyeWrapper eyeWrapper = this.actorRoot.handle.ActorControl as EyeWrapper; if (eyeWrapper != null) { int num = 0; if (skillContext.Originator) { SkillSlot skillSlot = skillContext.Originator.handle.SkillControl.GetSkillSlot(skillContext.SlotType); if (skillSlot != null) { int skillLevel = skillSlot.GetSkillLevel(); num = Mathf.Max(skillLevel - 1, 0); } } int num2 = this.EyeLifeTime; num2 += this.EyeLiftTimeGrowth * num; if (num2 < 0) { num2 = 0; } eyeWrapper.LifeTime = num2; eyeWrapper.SetPerishTime(this.EyePerishAdvTime); if (this.actorRoot.handle.HorizonMarker != null) { int num3 = this.sightRadius; num3 += this.SightRadiusGrowth * num; if (num3 < 0) { num3 = 0; } this.actorRoot.handle.HorizonMarker.SightRadius = num3; } if (this.actorRoot.handle.SMNode != null) { VCollisionSphere vCollisionSphere = new VCollisionSphere(); vCollisionSphere.Born(this.actorRoot); vCollisionSphere.Pos = VInt3.zero; vCollisionSphere.Radius = 500; vCollisionSphere.dirty = true; vCollisionSphere.ConditionalUpdateShape(); this.actorRoot.handle.SMNode.Attach(); } } } }
private void CreateEye(COM_PLAYERCAMP _camp) { if ((this.actorRoot != 0) && (this.sightRadius > 0)) { this.actorRoot.handle.TheActorMeta.ActorCamp = _camp; if (this.actorRoot.handle.HorizonMarker != null) { this.actorRoot.handle.HorizonMarker.SightRadius = this.sightRadius; } this.actorRoot.handle.ObjID = Singleton <GameObjMgr> .GetInstance().NewActorID; this.actorRoot.handle.ObjLinker.Invincible = true; Singleton <GameObjMgr> .instance.AddActor(this.actorRoot); VCollisionSphere sphere = new VCollisionSphere(); sphere.Born((ActorRoot)this.actorRoot); sphere.Pos = VInt3.zero; sphere.Radius = 500; sphere.dirty = true; sphere.ConditionalUpdateShape(); } }