Ejemplo n.º 1
0
        static public SceneEvent.ActorPosition GetActorPosition(string position)
        {
            position = position.ToLower();
            SceneEvent.ActorPosition pos = SceneEvent.ActorPosition.center;
            switch (position)
            {
            case "center":                  pos = SceneEvent.ActorPosition.center;                          break;

            case "left":                    pos = SceneEvent.ActorPosition.left;                            break;

            case "right":                   pos = SceneEvent.ActorPosition.right;                           break;

            case "middle_left":             pos = SceneEvent.ActorPosition.middle_left;             break;

            case "middle_right":    pos = SceneEvent.ActorPosition.middle_right;            break;
            }
            return(pos);
        }
Ejemplo n.º 2
0
        // Helper .

        public float GetPositionX(SceneEvent.ActorPosition actorPos)
        {
            float posX = centerPosX;

            switch (actorPos)
            {
            case SceneEvent.ActorPosition.center:                   posX = centerPosX;                      break;

            case SceneEvent.ActorPosition.left:                             posX = leftPosX;                        break;

            case SceneEvent.ActorPosition.right:                    posX = rightPosX;                       break;

            case SceneEvent.ActorPosition.middle_left:              posX = middleLeftPosX;          break;

            case SceneEvent.ActorPosition.middle_right:             posX = middleRightPosX;         break;
            }
            return(posX);
        }