public RollingCharacterController changeVector(RollingCharacterController character, float size) { character.setVectorDetail(new Vector3(size, size, 0)); Debug.Log("Vector details" + character.getVectorDetail()); character.transform.localScale = character.getVectorDetail(); return(character); }
//Score adder for gumball public static void ScoreAdderForGumballs(string objectName) { //Debug.Log (scoreSubject.getScore ()); switch (objectName) { case "green": case "blue": case "yellow": case "red": pointScore.AddScore(2); //add 2 points break; case "pink": case "purple": pointScore.AddScore(4); //add 4 points break; case "star": pointScore.AddScore(6); //add 6 points break; } count++; /*if(objectNameCount > 2 ) { * Debug.Log("Before calling Decorator"); * * * * }*/ if (count == 5) { speedManager.SetNewSpeed("medium"); RollingCharacterController newController = spriteDecorator.changeVector(rollingCharacterController, 16f); rollingCharacterController = newController; //rollingCharacterController.playerCharacter = new ConcretePlayerDecorator(new MediumPlayer (rollingCharacterController)); } else if (count == 10) { speedManager.SetNewSpeed("high"); RollingCharacterController newController = spriteDecorator.changeVector(rollingCharacterController, 22f); rollingCharacterController = newController; //rollingCharacterController.playerCharacter = new ConcretePlayerDecorator(new HighPlayer (rollingCharacterController)); } }
public SpeedManager (RollingCharacterController character) { this.character = character; }
public void SetSpeed(RollingCharacterController character,int speed){ character.forwardSpeed = speed; }
public SpeedManager(RollingCharacterController character) { this.character = character; }
public void SetSpeed(RollingCharacterController character, int speed) { character.forwardSpeed = speed; }
public void executeStrategy(RollingCharacterController character, int speed){ strategy.SetSpeed (character, speed); }
public BasicPlayer(RollingCharacterController characterController) { rollingCharacterController = characterController; }
public static void setCharacter(RollingCharacterController character) { rollingCharacterController = character; }
public HighPlayer(RollingCharacterController characterController) { rollingCharacterController = characterController; MAX_JUMPS = 2; }