Ejemplo n.º 1
0
    /*
     * SerializedProperty enteranceAniName;
     * SerializedProperty idleAniName;
     * SerializedProperty runAniName;
     * SerializedProperty runReadyAniName;
     * SerializedProperty runReadyAfterAniName;
     * SerializedProperty readyAniName;
     * SerializedProperty attackAniName;
     * SerializedProperty knockBackAniName;
     * SerializedProperty hitAniName;
     * SerializedProperty deadAniName;
     * SerializedProperty flyingAniName;
     *
     *
     * SerializedProperty readyRushAniName;
     * SerializedProperty startRushAniName;
     * SerializedProperty rushAniName;
     * SerializedProperty rushAttackAniName;
     *
     * SerializedProperty angryWalkAniName;
     */


    void OnEnable()
    {
        EnemyAnimation eAni = (EnemyAnimation)target;

        eAni.ani   = eAni.GetComponent <SkeletonAnimation>();
        eAni.enemy = eAni.GetComponent <Enemy>();


        #region FindProperty
        enemy = serializedObject.FindProperty("enemy");
        ani   = serializedObject.FindProperty("ani");

        //enteranceAniName = serializedObject.FindProperty("enteranceAniName");
        //idleAniName = serializedObject.FindProperty("idleAniName");
        //runAniName = serializedObject.FindProperty("runAniName");
        //runReadyAniName = serializedObject.FindProperty("runReadyAniName");
        //runReadyAfterAniName = serializedObject.FindProperty("runReadyAfterAniName");
        //readyAniName = serializedObject.FindProperty("readyAniName");
        //attackAniName = serializedObject.FindProperty("attackAniName");
        //knockBackAniName = serializedObject.FindProperty("knockBackAniName");
        //hitAniName = serializedObject.FindProperty("hitAniName");
        //deadAniName = serializedObject.FindProperty("deadAniName");
        //flyingAniName = serializedObject.FindProperty("flyingAniName");
        //readyRushAniName = serializedObject.FindProperty("readyRushAniName");
        //startRushAniName = serializedObject.FindProperty("startRushAniName");
        //rushAniName = serializedObject.FindProperty("rushAniName");
        //rushAttackAniName = serializedObject.FindProperty("rushAttackAniName");
        //angryWalkAniName = serializedObject.FindProperty("angryWalkAniName");
        #endregion
    }