void RpcControlAnimator(int targetHand, Pose newPose, Defs.WeaponType weapon) { //Pose pose = newPose; //Reset All Bools foreach (AnimatorControllerParameter parameter in anim.parameters) { if (parameter.type == AnimatorControllerParameterType.Bool) { anim.SetBool(parameter.name, false); } } //Set Target Bool string hand; if (targetHand == 0) { hand = "Right"; } else { hand = "Left"; } anim.SetBool(hand + newPose.ToString() + weapon.ToString(), true); }
//Weapon - Projectile public Item(int id, string title, Sprite image, Defs.ItemCategory category, int stackLimit, float weight, Defs.WeaponType weaponType, GameObject weaponObject, AudioClip[] windupSound, AudioClip[] releaseSound, AudioClip[] hitSound, AudioClip[] flightSound, Effector costEffector, Effector selfEffector, Effector selfOnHitEffector, Effector targetEffector, float windupTime, float strikeTime, float recoveryTime, GameObject projectileObject, float range, float speed, int targetLimit) { //Required this.ID = id; this.Title = title; this.Image = image; this.Category = category; this.StackLimit = stackLimit; this.Weight = weight; //Effectors this.CostEffector = costEffector; this.SelfEffector = selfEffector; this.SelfOnHitEffector = selfOnHitEffector; this.TargetEffector = targetEffector; //Weapon Specific this.WeaponType = weaponType; this.WeaponObject = weaponObject; //General this.WindupSound = windupSound; this.StrikeSound = releaseSound; this.HitSound = hitSound; this.WindupTime = windupTime; this.StrikeTime = strikeTime; this.RecoveryTime = recoveryTime; //Projectile this.ProjectileObject = projectileObject; this.FlightSound = flightSound; this.Range = range; this.Speed = speed; this.TargetLimit = targetLimit; }
//Weapon - Shield public Item(int id, string title, Sprite image, Defs.ItemCategory category, int stackLimit, float weight, Defs.WeaponType weaponType, GameObject weaponObject, AudioClip[] windupSound, AudioClip[] strikeSound, Effector costEffector, Effector selfEffector, Effector selfOnHitEffector, Effector targetEffector, float windupTime, float strikeTime, float recoveryTime, AudioClip[] blockSound, int blockAngle) { //Required this.ID = id; this.Title = title; this.Image = image; this.Category = category; this.StackLimit = stackLimit; this.Weight = weight; //Effectors this.CostEffector = costEffector; this.SelfEffector = selfEffector; this.SelfOnHitEffector = selfOnHitEffector; this.TargetEffector = targetEffector; //Weapon Specific this.WeaponType = weaponType; this.WeaponObject = weaponObject; //General this.WindupSound = windupSound; this.StrikeSound = strikeSound; this.WindupTime = windupTime; this.StrikeTime = strikeTime; this.RecoveryTime = recoveryTime; //Shield this.BlockSound = blockSound; this.BlockAngle = blockAngle; }