コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Scorer.cs プロジェクト: HarshadaMone/MarioIslander
        //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));
            }
        }
コード例 #3
0
ファイル: SpeedManager.cs プロジェクト: iammasariya/Martian
		public SpeedManager (RollingCharacterController character)
		{
			this.character = character;
		}
コード例 #4
0
		public void SetSpeed(RollingCharacterController character,int speed){
			character.forwardSpeed = speed;
		}
コード例 #5
0
 public SpeedManager(RollingCharacterController character)
 {
     this.character = character;
 }
コード例 #6
0
 public void SetSpeed(RollingCharacterController character, int speed)
 {
     character.forwardSpeed = speed;
 }
コード例 #7
0
		public void executeStrategy(RollingCharacterController character, int speed){
			strategy.SetSpeed (character, speed);
		}
コード例 #8
0
 public BasicPlayer(RollingCharacterController characterController)
 {
     rollingCharacterController = characterController;
 }
コード例 #9
0
ファイル: Scorer.cs プロジェクト: HarshadaMone/MarioIslander
 public static void setCharacter(RollingCharacterController character)
 {
     rollingCharacterController = character;
 }
コード例 #10
0
 public HighPlayer(RollingCharacterController characterController)
 {
     rollingCharacterController = characterController;
     MAX_JUMPS = 2;
 }