public void CheckHurtBoxCollision(HitboxObject hBox) // Called by SendMessage [HurtBox.cs]
 {
     if (hBox.GetHitboxPlayerId() != playerID)
     {
         GetHitByAttackHitBox(hBox.GetHitboxProperties());
     }
 }
Example #2
0
 private IObjectPool <HitboxObject> MakeNewPool(HitboxObject prefab)
 {
     return(new QueueBasedObjectPool <HitboxObject>(
                // We must instantiate a clone of the prefab instance as part of the contruction function, and make sure it starts off deactivated
                () => {
         var toRet = Instantiate(prefab);
         toRet.gameObject.SetActive(false);
         return toRet;
     }, ANIMATION_OBJ_PRE_INIT_SIZE
                ));
 }
Example #3
0
    protected virtual void InitUnitProperties()
    {
        BuffManager         = gameObject.AddComponent <BuffManager>();
        DisplacementManager = gameObject.AddComponent <DisplacementManager>();
        EffectSourceManager = gameObject.AddComponent <EffectSourceManager>();
        ForcedActionManager = gameObject.AddComponent <ForcedActionManager>();
        HitboxObject        = gameObject.GetComponentInChildren <Collider>().gameObject;
        ModelObject         = gameObject.GetComponentInChildren <MeshRenderer>().gameObject;
        ShieldManager       = gameObject.AddComponent <ShieldManager>();

        PhotonView = GetComponent <PhotonView>();
        HitboxObject.AddComponent <MouseEvent>();
    }