示例#1
0
    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);
        }
    }
示例#2
0
 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");
     }
 }
示例#3
0
 public void ImplementDoorClassCall(Round2.BINADOOR doorclass)
 {
 }