Hello .
At first i wanna say that i searched the forum for this and found some other topics such as this :
http://hutonggames.com/playmakerforum/index.php?topic=4898.0but i couldnt find my answer there . so here is my question :
I have this script :
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Invector;
public class MeleeWeapon : MeleeItem
{
#region variables
[Header("Weapon Settings")]
public int ATK_ID;
public int MoveSet_ID;
public Damage damage;
public DamagePercentage damagePercentage;
[Tooltip("How much stamina the attack will consume")]
public float staminaCost = 30f;
[Tooltip("Time for the stamina to recover")]
public float staminaRecoveryDelay = 1f;
[Header("Hitbox Settings")]
[Range(0.1f, 2.9f)]
public float centerSize = 1f;
[Range(-1.4f, 1.4f)]
public float centerPos = 0f;
public BoxCollider top, bottom, center;
public bool showHitboxes;
public HitProperties hitProperties { get; set; }
protected float curCenterSize;
[HideInInspector]
public HitBox hitTop, hitBotton, hitCenter;
public bool lockHitBox = true;
#endregion
[System.Serializable]
public class DamagePercentage
{
public float Top = 30f;
public float Center = 70f;
}
public void Init()
{
hitTop = top.GetComponent<HitBox>();
hitBotton = bottom.GetComponent<HitBox>();
hitCenter = center.GetComponent<HitBox>();
hitTop.hitBarPoint = HitBarPoints.Top;
hitCenter.hitBarPoint = HitBarPoints.Center;
hitBotton.hitBarPoint = HitBarPoints.Bottom;
hitTop.hitControl = this;
hitBotton.hitControl = this;
hitCenter.hitControl = this;
}
public bool isActive { get { return active; } }
public struct DamageType
{
public Collider hitCollider;
public HitBarPoints hitBarPoints;
}
}
I want to access the float "Top " and float "Center" in the Class "DamagePercentage" , but they are nowhere to be found .
Also when i add this script some other variables shows up in the inspector such as float "Value" or bool "Ignore Defense " which are not even in the script ( and i'm too noob to know where it is reading them from )
It maybe worth mentioning that it is "Melee Weapon" Script from " Melee Combat Template " asset by Invector .
Can someone help me on this ?