public bool isPlayerAuthorized() { bool isIn = false; BuildPrivilegeTrigger trigger = Player.FindTrigger <BuildPrivilegeTrigger>(); if (trigger != null) { isIn = trigger.privlidgeEntity.IsAuthed(Player); } return(isIn); }
private bool updateTrigger(BuildPrivilegeTrigger bpt) { var col = bpt.GetComponent <UnityEngine.Collider>(); var wasTrigger = true; if (col != null) // should always be the case { if (col is SphereCollider && Mathf.Approximately((col as SphereCollider).radius, radius)) { return(false); // Already a sphere with that radius } wasTrigger = col.isTrigger; UnityEngine.Object.Destroy(col); } col = bpt.gameObject.AddComponent <SphereCollider>(); col.transform.localPosition = Vector3.zero; col.transform.localScale = Vector3.one; ((SphereCollider)col).radius = radius; col.isTrigger = wasTrigger; return(true); }
private bool updateTrigger(BuildPrivilegeTrigger bpt) { var col = bpt.GetComponent <UnityEngine.Collider>(); return(true); }