Ejemplo n.º 1
0
    /*private void saveMovement(float[] inputValues, TypeTransform typeTransform) {
     *          Vector3 movement;
     *
     *          movement = new Vector3(inputValues[0], inputValues[1], inputValues[2]);
     *          MovementInGameDb.Insert(movement, typeTransform, countTries, LevelController.Instance.ActualGame.Id);
     *          countTries++;
     *  }*/

    private void saveMovement(TYPE_MOVEMENT t, float[] inputValues)
    {
        Vector3 movement;

        movement = new Vector3(inputValues[0], inputValues[1], inputValues[2]);
        LevelController.Instance.AddMovement(t, movement);
    }
Ejemplo n.º 2
0
        public void AddMovement(TYPE_MOVEMENT type, string movement, int sequence)
        {
            string typeMovement = getStringTypeMovement(type);

            movements.Add(new Movement
            {
                sequence     = sequence,
                typeMovement = typeMovement,
                movement     = movement
            });
        }
Ejemplo n.º 3
0
        private string getStringTypeMovement(TYPE_MOVEMENT type)
        {
            string typeMovement = "";

            switch (type)
            {
            case TYPE_MOVEMENT.ROTATE:
                typeMovement = ROTATE;
                break;

            case TYPE_MOVEMENT.SCALE:
                typeMovement = SCALE;
                break;

            case TYPE_MOVEMENT.TRANSLATE:
                typeMovement = TRANSLATE;
                break;
            }
            return(typeMovement);
        }
Ejemplo n.º 4
0
    void OnGUI()
    {
        scrollPos = (Vector2)GUILayout.BeginScrollView(scrollPos);

        GUILayout.BeginHorizontal();
        GUILayout.Label("Sprite Desire");
        desireSprite = (Sprite)EditorGUILayout.ObjectField(desireSprite, typeof(Sprite), false, null);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Color Desire");
        desireColor = EditorGUILayout.ColorField(desireColor);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Speed Desire");
        desireSpeed = EditorGUILayout.FloatField(desireSpeed);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Type Movement Desire");
        desireTypeMovement = (TYPE_MOVEMENT)EditorGUILayout.EnumPopup(desireTypeMovement);
        GUILayout.EndHorizontal();

        if (GUILayout.Button("Create!"))
        {
            BallData bd = ScriptableObject.CreateInstance <BallData> ();
            bd.defaultBallSprite       = desireSprite;
            bd.defaultBallColor        = desireColor;
            bd.defaultBallSpeed        = desireSpeed;
            bd.defaultBallTypeMovement = desireTypeMovement;
            int i = 0;
            while (AssetDatabase.IsMainAssetAtPathLoaded(dataPathBallData + i.ToString() + ".asset"))
            {
                i++;
            }
            AssetDatabase.CreateAsset(bd, dataPathBallData + i.ToString() + ".asset");
        }
        GUILayout.EndScrollView();
    }
Ejemplo n.º 5
0
 public void AddMovement(TYPE_MOVEMENT type, Vector3 movement)
 {
     gameFire.AddMovement(type, LevelFire.GetCommaVector3(movement), count++);
 }
Ejemplo n.º 6
0
 public void AddMovement(TYPE_MOVEMENT type, Vector3 movement)
 {
     gameFireMaker.AddMovement(type, movement);
 }