public static void InitializeFrom(Round2.BINADOOR door) { if (m_doorlist.ContainsKey(door._OSD.DoorId)) { Round2.DOOR l_d = Round2.DOOR.m_doorClasses[door._OSD.Class]; foreach (OBOA_Instantiator iinst in m_doorlist[door._OSD.DoorId]) { SphereCollider sc = iinst.gameObject.AddComponent <SphereCollider>(); sc.radius = Mathf.Sqrt(door._OSD.SquaredActivationRadius) / 2f; sc.isTrigger = true; Animation l_a = iinst.GetComponentInChildren <Animation>(); l_a.AddClip(l_d.Animation.OBAN.Clip(true), "door"); iinst.m_onTriggerHit = () => { foreach (OBOA_Instantiator _iinst in m_doorlist[door._OSD.DoorId]) { _iinst.GetComponentInChildren <Animation>().Play("door"); } }; } } else { Debug.LogError("INVALID DOOR ID:" + door._OSD.DoorId); } }
public static void DoorClassCall(Round2.BINADOOR doorclass) { if (m_doorlist.ContainsKey(doorclass._OSD.DoorId)) { foreach (OBOA_Instantiator iinst in m_doorlist[doorclass._OSD.DoorId]) { iinst.ImplementDoorClassCall(doorclass); } } else { Debug.LogError("Improper doorId or ONOAid"); } }
public void ImplementDoorClassCall(Round2.BINADOOR doorclass) { }