/// <summary>
 /// Called when a prop has been created
 /// </summary>
 public void OnPropCreated(Prop prop)
 {
     if (mReconstructionBehaviour)
     {
         mReconstructionBehaviour.AssociateProp(PropTemplate, prop);
     }
 }
Ejemplo n.º 2
0
    public void OnPropCreated(Prop prop)
    {
        Debug.Log("---Created Prop");

        if (mReconstructionBehaviour != null)
        {
            mReconstructionBehaviour.AssociateProp(PropTemplate, prop);
        }
    }
 public void OnPropCreated(Prop prop)
 {
     //shows an example of how you could get a handle on the prop game objects to perform different game logic
     if (mReconstructionBehaviour)
     {
         mReconstructionBehaviour.AssociateProp(PropTemplate, prop);
         PropAbstractBehaviour behaviour;
         if (mReconstructionBehaviour.TryGetPropBehaviour(prop, out behaviour))
         {
             behaviour.gameObject.name = "Prop " + prop.ID;
         }
     }
 }
 //对边塔的生成进行监听回调
 public void OnPropCreated(Prop prop)
 {
     //此处可以根据prop相关信息为其挂载不同的游戏逻辑
     //同时对于prop数量进行监控
     if (mReconstructionBehaviour && num < maxProp)
     {
         mReconstructionBehaviour.AssociateProp(PropTemplate, prop);
         PropAbstractBehaviour behaviour;
         if (mReconstructionBehaviour.TryGetPropBehaviour(prop, out behaviour))
         {
             behaviour.gameObject.name = "Prop " + prop.ID;
         }
         //增加边塔数量
         num++;
     }
 }