Ejemplo n.º 1
0
        public AttacksRow GetRow(string rowString)
        {
            AttacksRow ret = null;

            try
            {
                ret = Rows[(int)Enum.Parse(typeof(rowIds), rowString)];
            }
            catch (ArgumentException) {
                Debug.LogError(rowString + " is not a member of the rowIds enumeration.");
            }
            return(ret);
        }
Ejemplo n.º 2
0
        public AttacksRow GetRow(rowIds rowID)
        {
            AttacksRow ret = null;

            try
            {
                ret = Rows[(int)rowID];
            }
            catch (KeyNotFoundException ex)
            {
                Debug.LogError(rowID + " not found: " + ex.Message);
            }
            return(ret);
        }
Ejemplo n.º 3
0
    /*
     * Search through our list of attacks and returns the requested Attack.
     * Must supply the GoogleFU rowID as a string value.
     */
    public AttackData GetAttack(string attackId)
    {
        AttackData ret = null;

        foreach (AttackData attack in attackList)
        {
            GoogleFu.AttacksRow requestedAttack = attacksDb.GetRow(attackId);
            if (requestedAttack == null)
            {
                Debug.LogError("Could not find attack for attackId: " + attackId);
            }
            if (string.Equals(attack.attackName, requestedAttack._NAME))
            {
                ret = attack;
            }
        }
        return(ret);
    }
Ejemplo n.º 4
0
        public override void OnInspectorGUI()
        {
            Attacks    s = target as Attacks;
            AttacksRow r = s.Rows[Index];

            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button("<<"))
            {
                Index = 0;
            }
            if (GUILayout.Button("<"))
            {
                Index -= 1;
                if (Index < 0)
                {
                    Index = s.Rows.Count - 1;
                }
            }
            if (GUILayout.Button(">"))
            {
                Index += 1;
                if (Index >= s.Rows.Count)
                {
                    Index = 0;
                }
            }
            if (GUILayout.Button(">>"))
            {
                Index = s.Rows.Count - 1;
            }

            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("ID", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(s.rowNames[Index]);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("NAME", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._NAME);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("MINDAMAGE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.IntField(r._MINDAMAGE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("MAXDAMAGE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.IntField(r._MAXDAMAGE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("RANGE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.FloatField(r._RANGE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("STRENGTH", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._STRENGTH);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("CONTROLTYPE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._CONTROLTYPE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("REACTIONTYPE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._REACTIONTYPE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("MINKNOCKBACK", GUILayout.Width(150.0f));
            {
                EditorGUILayout.FloatField(r._MINKNOCKBACK);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("MAXKNOCKBACK", GUILayout.Width(150.0f));
            {
                EditorGUILayout.FloatField(r._MAXKNOCKBACK);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("CHARGEANIMATION", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._CHARGEANIMATION);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("CHARGEMOVESCALE", GUILayout.Width(150.0f));
            {
                EditorGUILayout.FloatField(r._CHARGEMOVESCALE);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("SWINGANIMATION", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._SWINGANIMATION);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("PROJECTILEPREFAB", GUILayout.Width(150.0f));
            {
                EditorGUILayout.LabelField(r._PROJECTILEPREFAB);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("CAMERASHAKEINTENSITY", GUILayout.Width(150.0f));
            {
                EditorGUILayout.FloatField(r._CAMERASHAKEINTENSITY);
            }
            EditorGUILayout.EndHorizontal();
        }