public override void SetupInstance(BSPFile bsp, entity entity, SceneEntities entities) { base.SetupInstance(bsp, entity, entities); if (string.IsNullOrEmpty(this.message)) { Debug.LogError("Can't set skill: message is null or empty"); return; } int value; if (!int.TryParse(this.message, out value)) { Debug.LogError("Can't set skill: invalid message '" + this.message + "'"); return; } if (!Enum.IsDefined(typeof(GameSkill), value)) { Debug.LogError("Can't set skill: invalid GameSkill value '" + value + "'"); return; } var trigger = entity.GetComponent <trigger_setskill>(); trigger.skill = (GameSkill)value; }
public override void SetupInstance(BSPFile bsp, entity entity, SceneEntities entities) { base.SetupInstance(bsp, entity, entities); if (this.spawnflags == 1) // not sure what this value means but it might be "crucified" { var rigidBoby = entity.GetComponent <Rigidbody>(); if (rigidBoby != null) { GameObject.DestroyImmediate(rigidBoby); } var collider = entity.GetComponent <BoxCollider>(); if (collider != null) { GameObject.DestroyImmediate(collider); } var zombie = entity as monster_zombie; zombie.crucified = true; } }
public override void SetupInstance(BSPFile bsp, entity entity, SceneEntities entities) { base.SetupInstance(bsp, entity, entities); var collider = entity.GetComponent <BoxCollider>(); var colliderSize = this.size; colliderSize.x += 0.4f; colliderSize.y += 0.4f; colliderSize.z += 0.4f; collider.size = colliderSize; }
public override void SetupInstance(BSPFile bsp, entity entity, SceneEntities entities) { base.SetupInstance(bsp, entity, entities); if (modelRef != null) { var collider = entity.GetComponent <BoxCollider>(); collider.size = this.size; } if (health > 0) { entity.gameObject.layer = LayerMask.NameToLayer("ShootTrigger"); } }