示例#1
0
 public void PourOutLiquidToOtherVessel(CLGameObject vessel)
 {
     if (EventsManager.AnyVesselPourLiquidToOtherVessel != null)
     {
         EventsManager.AnyVesselPourLiquidToOtherVessel(cl_object, vessel.cl_object);
     }
 }
示例#2
0
    public ExperimentalInfo GetExperimentalInfo()
    {
        ExperimentalInfo info = new ExperimentalInfo();

        info.CL_Objects = new List <CL_Object>(CL_Objects.Values);
        info.Operations = Operations;
        foreach (var t in SceneObjects)
        {
            CLGameObject clg = t.GetComponent <CLGameObject>();
            info.SceneObjects.Add(clg.cl_object);
        }
        info.EventClassifys = new List <string>(EventInfos.Keys);
        info.EventInfos     = new List <List <EventInfo> >(EventInfos.Values);
        return(info);
    }
 // Use this for initialization
 void Awake()
 {
     liquidMesh   = GetComponent <RotatorMesh>();
     cLGameObject = GetComponentInParent <CLGameObject>();
     liquidMesh.HR.ForEach(s => {
         if (minheight > s.x)
         {
             minheight = s.x;
         }
     });
     LiquidClear();
     if (liquidMesh == null)
     {
         print("不存在LiquidMesh");
         this.enabled = false;
         return;
     }
     liquidMesh.renderer.material = new Material(liquidMesh.renderer.material);
     ParticleSystem = Instantiate(PourWaterEffective).GetComponent <ParticleSystem>();
     ParticleSystem.GetComponent <Renderer>().material = liquidMesh.renderer.material;
     ParticleSystem.gameObject.SetActive(false);
 }