Exemplo n.º 1
0
 public void CheckHurtBoxCollision(HitboxObject hBox) // Called by SendMessage [HurtBox.cs]
 {
     if (hBox.GetHitboxPlayerId() != playerID)
     {
         GetHitByAttackHitBox(hBox.GetHitboxProperties());
     }
 }
Exemplo n.º 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
                ));
 }
Exemplo n.º 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>();
    }