public static void setSqPCName (SquirrelPlayerCharacter mySquirrel, string mySqName) { mySquirrel.squirrelName = mySqName; }
public static SSGameItem getFootItemWorn(SquirrelPlayerCharacter mySquirrel) { return mySquirrel.itemWornOnFeet; }
public static void clearTempBoosts (SquirrelPlayerCharacter mySquirrel) { mySquirrel.tempRunBoost = 0; mySquirrel.tempJumpBoost = 0; mySquirrel.tempClimbBoost = 0; }
public static SSGameItem getHeadItemWorn(SquirrelPlayerCharacter mySquirrel) { return mySquirrel.itemWornOnHead; }
public static SSGameItem getBodyItemWorn(SquirrelPlayerCharacter mySquirrel) { return mySquirrel.itemWornOnBody; }
public static void setSqPCRun (SquirrelPlayerCharacter mySquirrel, int mySqRun) { mySquirrel.squirrelRunValue = mySqRun; }
public static void setSqPCClimb (SquirrelPlayerCharacter mySquirrel, int mySqClimb) { mySquirrel.squirrelClimbValue = mySqClimb; }
public static void decreaseHealth (SquirrelPlayerCharacter mySquirrel) { mySquirrel.squirrelMaxHealthValue --; mySquirrel.squirrelCurrentHealthValue --; }
public static void InflictHeartDamage (SquirrelPlayerCharacter mySquirrel) { mySquirrel.squirrelCurrentHealthValue --; }
public static void removeItemBoosts (SquirrelPlayerCharacter mySquirrel, SSGameItem myItem) { if (myItem.itemBenefit != "none") { string statToReduce; int amountToReduce; statToReduce = myItem.itemBenefit.Substring (3,1); amountToReduce = int.Parse(myItem.itemBenefit.Substring (1,1)); switch (statToReduce) { case "A": CreatePCSquirrel.pcSquirrel.clothingRunBoost -= amountToReduce; CreatePCSquirrel.pcSquirrel.clothingJumpBoost -= amountToReduce; CreatePCSquirrel.pcSquirrel.clothingClimbBoost -= amountToReduce; CreatePCSquirrel.pcSquirrel.squirrelMaxHealthValue -= amountToReduce; CreatePCSquirrel.pcSquirrel.squirrelCurrentHealthValue -= amountToReduce; break; case "C": CreatePCSquirrel.pcSquirrel.clothingClimbBoost -= amountToReduce; break; case "H": CreatePCSquirrel.pcSquirrel.squirrelMaxHealthValue -= amountToReduce; CreatePCSquirrel.pcSquirrel.squirrelCurrentHealthValue -= amountToReduce; break; case "J": CreatePCSquirrel.pcSquirrel.clothingJumpBoost -= amountToReduce; break; case "R": CreatePCSquirrel.pcSquirrel.clothingRunBoost -= amountToReduce; break; default: Debug.Log ("Error removing clothing boost"); break; } } }
public static void clearItemsWorn (SquirrelPlayerCharacter mySquirrel) { setItemWorn (mySquirrel, MasterObjectList.masterItemList.Find(item => item.itemName == "Remove Head Item")); setItemWorn (mySquirrel, MasterObjectList.masterItemList.Find(item => item.itemName == "Remove Body Item")); setItemWorn (mySquirrel, MasterObjectList.masterItemList.Find(item => item.itemName == "Remove Foot Item")); }
public static void setItemWorn (SquirrelPlayerCharacter mySquirrel, SSGameItem myItem) { if ((myItem.itemID >= 2000) && (myItem.itemID < 3000)) { mySquirrel.itemWornOnHeadID = myItem.itemID; mySquirrel.itemWornOnHead = myItem; mySquirrel.spriteWornOnHead = myItem.itemDressupSprite; ReSkinHeadGearAnimation.headGearSpriteSheetName = "sprite-worn-" + myItem.itemPicName; } if ((myItem.itemID >= 3000) && (myItem.itemID < 4000)) { mySquirrel.itemWornOnBodyID = myItem.itemID; mySquirrel.itemWornOnBody = myItem; mySquirrel.spriteWornOnBody = myItem.itemDressupSprite; ReSkinBodyGearAnimation.bodyGearSpriteSheetName = "sprite-worn-" + myItem.itemPicName; } if ((myItem.itemID >= 4000) && (myItem.itemID < 5000)) { mySquirrel.itemWornOnFeetID = myItem.itemID; mySquirrel.itemWornOnFeet = myItem; mySquirrel.spriteWornOnFeet = myItem.itemDressupSprite; ReSkinFootGearAnimation.footGearSpriteSheetName = "sprite-worn-" + myItem.itemPicName; } if (myItem.itemBenefit != "none") { string statToBoost; int amountToBoost; statToBoost = myItem.itemBenefit.Substring (3,1); amountToBoost = int.Parse(myItem.itemBenefit.Substring (1,1)); switch (statToBoost) { case "A": CreatePCSquirrel.pcSquirrel.clothingRunBoost += amountToBoost; CreatePCSquirrel.pcSquirrel.clothingJumpBoost += amountToBoost; CreatePCSquirrel.pcSquirrel.clothingClimbBoost += amountToBoost; CreatePCSquirrel.pcSquirrel.squirrelMaxHealthValue += amountToBoost; CreatePCSquirrel.pcSquirrel.squirrelCurrentHealthValue += amountToBoost; SoundEffects.PlaySoundOnHeal (); break; case "C": CreatePCSquirrel.pcSquirrel.clothingClimbBoost += amountToBoost; SoundEffects.PlaySoundOnPickUp (); break; case "H": CreatePCSquirrel.pcSquirrel.squirrelMaxHealthValue += amountToBoost; CreatePCSquirrel.pcSquirrel.squirrelCurrentHealthValue += amountToBoost; SoundEffects.PlaySoundOnHeal (); break; case "J": CreatePCSquirrel.pcSquirrel.clothingJumpBoost += amountToBoost; SoundEffects.PlaySoundOnPickUp (); break; case "R": CreatePCSquirrel.pcSquirrel.clothingRunBoost += amountToBoost; SoundEffects.PlaySoundOnPickUp (); break; default: Debug.Log ("Error adding clothing boost"); break; } } }
public static void setSqPCAcorns (SquirrelPlayerCharacter mySquirrel, int mySqAcorns) { mySquirrel.squirrelAcornsInHand = mySqAcorns; }
public static void setSqPCHealth (SquirrelPlayerCharacter mySquirrel, int mySqHealth) { mySquirrel.squirrelMaxHealthValue = mySqHealth; mySquirrel.squirrelCurrentHealthValue = mySqHealth; }
public static void setSqPCPlayer (SquirrelPlayerCharacter mySquirrel, string mySqPlayer){ mySquirrel.squirrelPlayerName = mySqPlayer; // the username of the player }
public static int getSqPCAcorns (SquirrelPlayerCharacter mySquirrel) { return mySquirrel.squirrelAcornsInHand; }
public static void setSqPCType (SquirrelPlayerCharacter mySquirrel, int mySqType) { mySquirrel.squirrelType = mySqType; // 1 = gray, 2 = red }
public static Sprite getSpriteWornOnFeet (SquirrelPlayerCharacter mySquirrel) { return mySquirrel.spriteWornOnFeet; }
public static void setSqPCJump (SquirrelPlayerCharacter mySquirrel, int mySqJump) { mySquirrel.squirrelJumpValue = mySqJump; }
public static void SetRandomClothingItem (SquirrelPlayerCharacter mySquirrel, string mySlot) { // random clothing generator for initial squirrels if (mySlot == "Head") { switch (Random.Range (0, 3)) { case 0: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Red Cap")); // head slot item break; case 1: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Black Dress")); // head slot item break; default: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Remove Head Item")); // head slot item break; } } if (mySlot == "Body") { switch (Random.Range (0, 3)) { case 0: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Green Shirt")); // body slot item break; case 1: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Pink Hat")); // body slot item break; default: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Remove Body Item")); // body slot item break; } } if (mySlot == "Foot") { switch (Random.Range (0, 3)) { case 0: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Blue Sneakers")); // foot slot item break; case 1: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Brown Boots")); // foot slot item break; default: SquirrelPlayerCharacter.setItemWorn (mySquirrel, masterItemList.Find (item => item.itemName == "Remove Foot Item")); // foot slot item break; } } } // end SetRandomClothingItem