/// <summary> /// Template to create new animals /// </summary> /// <param name="name">The name of the object (prefixes are recommended, but not needed)</param> /// <param name="ID">The Identifiable ID for this animal</param> /// <param name="mesh">The model's mesh for this animal</param> /// <param name="materials">The materials that compose this animal's model</param> /// <param name="animator">The animator used by the animal</param> /// <param name="isChild">Is this animal a child?</param> public AnimalTemplate(string name, Identifiable.Id ID, Mesh mesh, Material[] materials, Create <Animator> animator, bool isChild = false) : base(name) { this.ID = ID; this.mesh = mesh; this.materials = materials; this.animator = animator; this.isChild = isChild; moveComponent = new Create <ChickenRandomMove>((move) => { move.maxJump = isChild ? 0.7f : 1f; move.walkForwardForce = isChild ? 2.5f : 3.333f; move.flapCue = EffectObjects.cueFlap; }); skinnedMesh = BaseObjects.originSkinnedMesh["HenSkinned"]; bones = BaseObjects.originBones["HenBones"]; }
/// <summary> /// Sets the movement component to a new one (Default is the Chicken Movement) /// </summary> /// <param name="comp">New component to use</param> public AnimalTemplate SetMoveComponent(ICreateComponent comp) { moveComponent = comp; return(this); }
/// <summary> /// Adds a new behaviour to the slime /// </summary> /// <param name="component">The component containing the new behaviour</param> public SlimeTemplate AddBehaviour(ICreateComponent component) { extras.Add(component); return(this); }
/// <summary> /// Adds a new behaviour to the slime /// </summary> /// <param name="component">The component containing the new behaviour</param> /// <param name="comps">A list of components containing the new behaviour</param> public SlimeTemplate AddBehaviour(ICreateComponent component, params ICreateComponent[] comps) { extras.Add(component); extras.AddRange(comps); return(this); }
public LayoutGenerator(ICreateComponent creator) { this.creator = creator; this.CP = new ComponentProperty(false); }