Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 // Use this for initialization
 void Awake()
 {
     if (ctrl == null)
     {
         ctrl = this;
     }
     else
     {
         DestroyImmediate(this.gameObject);
     }
 }
Ejemplo n.º 2
0
        public WaterSim()
        {
            _geometryAndSettings = new GeometryAndSettings()
            {
                graphics = new GraphicsDeviceManager(this)
            };

            _waterControl  = new WaterControl(_geometryAndSettings);
            _landControl   = new LandControl(_geometryAndSettings);
            _renderControl = new RenderControl(_geometryAndSettings);
            _cameraManager = new CameraManager(_geometryAndSettings);

            Content.RootDirectory = "Content";
        }
Ejemplo n.º 3
0
 void Start()
 {
     //Set this gameObject and it's position
     m_potion = this.gameObject;
     m_potion.transform.SetParent(m_canvas.transform);
     //Gettinng Components
     m_controller   = GetComponent <WaterControl>();
     m_manager      = GameObject.FindGameObjectWithTag("Manager");
     m_potionScript = m_manager.GetComponent <PotionScript>();
     //fill lists
     if (m_isPositive)
     {
         m_potionScript.m_PpotionList.Add(gameObject);
         m_potion.SetActive(false);
     }
     else
     {
         m_potionScript.m_NpotionList.Add(gameObject);
         m_potion.SetActive(false);
     }
 }
 public void Put(int id, [FromBody] WaterControl value)
 {
     var waterControl = service.Put <WaterControlValidator>(value);
 }
 public void Post([FromBody] WaterControl value)
 {
     var waterControl = service.Post <WaterControlValidator>(value);
 }