private bool IsHiddenWallmount(GameObject obj)
    {
        WallmountBehavior wallmountBehavior = obj.GetComponent <WallmountBehavior>();

        if (wallmountBehavior == null)
        {
            //not a wallmount
            return(false);
        }

        return(wallmountBehavior.IsHiddenFromLocalPlayer());
    }
 private void Start()
 {
     spriteRenderer    = GetComponent <SpriteRenderer>();
     wallmountBehavior = GetComponentInParent <WallmountBehavior>();
     //some of the mapped ones have duplicates of this, this ensures they're removed
     foreach (var wsb in GetComponents <WallmountSpriteBehavior>())
     {
         if (wsb != this)
         {
             Destroy(wsb);
         }
     }
 }
 private bool CanInteractWallmount(WallmountBehavior wallmount)
 {
     //can only interact if the player is facing the wallmount
     return(wallmount.IsFacingPosition(transform.position));
 }
Esempio n. 4
0
 private void Start()
 {
     spriteRenderer    = GetComponent <SpriteRenderer>();
     wallmountBehavior = GetComponentInParent <WallmountBehavior>();
 }