Exemple #1
0
 public void EndTarget()
 {
     m_targetSet   = false;
     m_targetObj   = false;
     m_followObj   = null;
     m_minDistance = 0.2f;
 }
Exemple #2
0
    // public AudioClip Hit;

    internal void Awake()
    {
        m_movementController = GetComponent <PhysicsTD>();
        m_fighter            = GetComponent <Fighter>();
        m_health             = Mathf.Min(m_health, MaxHealth);
        m_currDeathTime      = DeathTime;
    }
Exemple #3
0
 public void endTarget()
 {
     targetSet   = false;
     targetObj   = false;
     followObj   = null;
     minDistance = 0.2f;
 }
Exemple #4
0
 virtual public void Init()
 {
     m_creatorPhysics = Creator.GetComponent <PhysicsTD>();
     if (m_isRandomKnockback)
     {
         RandomizeKnockback();
     }
     m_hasDuration = m_duration > 0;
     Tick();
 }
Exemple #5
0
 void Start()
 {
     m_fighter    = GetComponent <Fighter> ();
     m_attackable = GetComponent <Attackable> ();
     m_physics    = GetComponent <PhysicsTD> ();
     if (!UniqueAIPrediction)
     {
         AIPredictionHitbox = HitboxScale;
         AIPredictionOffset = HitboxOffset;
     }
 }
Exemple #6
0
 internal void Start()
 {
     m_anim       = GetComponent <AnimatorSprite> ();
     m_physics    = GetComponent <PhysicsTD> ();
     m_attackable = GetComponent <Attackable> ();
     Reset();
     if (followObj != null)
     {
         setTarget(followObj);
     }
 }
Exemple #7
0
    // Use this for initialization
    void Start()
    {
        if (directionComponent == null)
        {
            directionComponent = GetComponent <PhysicsTD>();
        }

        upRotation    = Quaternion.Euler(-15f, 0f, 0f);
        downRotation  = Quaternion.Euler(105f, 0f, 0f);
        leftRotation  = Quaternion.Euler(20f, -70f, 90f);
        rightRotation = Quaternion.Euler(20f, 70f, -90f);


        dir = directionComponent.Dir;
        ChooseDirection();
    }
Exemple #8
0
 protected void init()
 {
     m_anim        = GetComponent <AnimatorSprite> ();
     m_physics     = GetComponent <PhysicsTD> ();
     m_attackable  = GetComponent <Attackable> ();
     m_faction     = gameObject.GetComponent <Attackable> ().faction;
     m_hitboxMaker = GetComponent <HitboxMaker> ();
     endAttack();
     AttackInfo[] at = gameObject.GetComponents <AttackInfo> ();
     foreach (AttackInfo a in at)
     {
         if (!attacks.ContainsKey(a.attackName))
         {
             attacks.Add(a.attackName, a);
         }
     }
     m_animationSpeed = 1f;
 }
Exemple #9
0
    internal void Awake()
    {
        m_physics     = GetComponent <PhysicsTD>();
        m_hitboxMaker = GetComponent <HitboxMaker>();

        m_progress         = AttackState.INACTIVE;
        m_progressEndTimes = new Dictionary <AttackState, float>()
        {
            { AttackState.STARTUP, StartUpTime },
            { AttackState.ATTACK, StartUpTime + AttackTime },
            { AttackState.RECOVERY, StartUpTime + AttackTime + RecoveryTime },
            { AttackState.INACTIVE, 0 }
        };
        m_progressCalls = new Dictionary <AttackState, Action>()
        {
            { AttackState.STARTUP, OnAttack },
            { AttackState.ATTACK, OnRecovery },
            { AttackState.RECOVERY, OnConclude },
            { AttackState.INACTIVE, OnStartUp }
        };
    }
Exemple #10
0
 internal void Awake()
 {
     m_physics = GetComponent <PhysicsTD>();
 }
Exemple #11
0
 private void SetTarget(PhysicsTD target)
 {
     m_targetObj = true;
     m_targetSet = true;
     m_followObj = target;
 }
Exemple #12
0
 void Awake()
 {
     m_physics = GetComponent <PhysicsTD>();
     m_fighter = GetComponent <Fighter>();
 }
Exemple #13
0
 void setTarget(PhysicsTD target)
 {
     targetObj = true;
     targetSet = true;
     followObj = target;
 }
Exemple #14
0
 void Start()
 {
     m_physics = GetComponent <PhysicsTD> ();
 }
Exemple #15
0
 internal void Awake()
 {
     m_anim       = GetComponent <AnimatorSprite>();
     m_physics    = GetComponent <PhysicsTD>();
     m_attackable = GetComponent <Attackable>();
 }
Exemple #16
0
 // Use this for initialization
 void Start()
 {
     movementController = gameObject.GetComponent <PhysicsTD> ();
     health             = Mathf.Min(health, max_health);
     currDeathTime      = deathTime;
 }
Exemple #17
0
 internal void Awake()
 {
     m_physics = GetComponent <PhysicsTD>();
     m_states  = new List <string>();
     m_anim    = GetComponent <Animator>();
 }