Exemple #1
0
    //ВРЕМЕННЫЕ ПЕРЕМЕННЫЕ

    /*public float viewRadius;
     * public float viewAngle;
     * public LayerMask viewRadiusMask;*/

    void Start()
    {
        camtr      = Camera.main.GetComponent <Transform>();
        bahaha     = camtr.GetComponent <MainBehaviour>();
        thisTr     = transform;
        planeTrans = thisTr.Find("Plane");
    }
Exemple #2
0
 public static void StopEffect(Tile t)
 {
     if (_effects.ContainsKey(t))
     {
         MainBehaviour.Destroy(_effects[t]);
     }
 }
Exemple #3
0
        public ClientBuilding(byte id, ClientPlayer owner, ClientTile tile) : base(id, owner)
        {
            var prefab = Resources.Load("prefabs/buildings/" + id);

            StackLog.Debug("Instantiating BUILDING");
            _gameObject = MainBehaviour.Instantiate(prefab, ((ClientChunk)tile.Chunk).GetGameObject().transform) as GameObject;
        }
 // Start is called before the first frame update
 void Start()
 {
     SetHomeActive();
     //SetLogActive();
     Instance = this;
     Webfin   = GetComponent <WebFin>();
     userinfo = GetComponent <UserInfo>();
 }
Exemple #5
0
        public static void BattleEffect(ClientTile t)
        {
            StopEffect(t);
            var prefab = Resources.Load("prefabs/BattleEffect");
            var obj    = MainBehaviour.Instantiate(prefab, t.GetGameObject().transform) as GameObject;

            _effects[t] = obj;
            obj.transform.localPosition = new Vector3(0, 0.2f, 0);
        }
Exemple #6
0
 void Start()
 {
     timer       = 0;
     thisTr      = transform;
     setRotation = 0;
     mb          = Camera.main.GetComponent <MainBehaviour>();
     planeTrans  = thisTr.Find("Plane");
     scoreSend   = true;
     StartCoroutine("FindEnemyCor", 0.2f);
 }
    void Awake()
    {
        main           = GameObject.Find("MainLoop").GetComponent <MainBehaviour>();//mainCamera.GetComponent<MainBehaviour>();
        loginName.Text = main.defaultAccount;
        loginIp.Text   = main.defaultServerIP;

        gameObject.SetActiveRecursively(false);

        CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_UI_INFOS, HandelUIInfos);
        CEventSystem.Instance.RegisterEventHandle(GAME_EVENT_ID.GE_GAMELOGIN_OPEN_SELECT_CHARACTOR, HandelUIInfos);
    }
Exemple #8
0
    void Start()
    {
        sprites         = GameObject.Find("SpriteObject").GetComponent <Sprites>();
        MainBehav       = GameObject.Find("main").GetComponent <MainBehaviour>();
        menuView        = GameObject.Find("CategoriasView");
        DescripcionView = GameObject.Find("DescripcionView");

        GreenFrame = GameObject.Find("GreenFrame");


        scrollEstado = 1;
        scrollMax    = 4;
        CerrarMenu();
    }
Exemple #9
0
        private GameObject GetOrCreatePathLine(ClientTile tile, ClientPath clientPath)
        {
            var pooled = _pathlinesPool.FirstOrDefault(path => !path.activeInHierarchy);

            if (pooled == null)
            {
                Log.Debug("Created new path line");
                pooled = MainBehaviour.Instantiate(Resources.Load("prefabs/HalfPath")) as GameObject;
                _pathlinesPool.Add(pooled);
            }
            else
            {
                pooled.SetActive(true);
                pooled.transform.rotation = Quaternion.identity;
            }
            clientPath.Add(tile, pooled);
            return(pooled);
        }
Exemple #10
0
        public void AddToScene(byte tileID)
        {
            var tileSpec = StrategyGame.Specs.GetTileSpec(tileID);

            foreach (var art in tileSpec.Arts)
            {
                if (_gameObj == null)
                {
                    var prefab = Resources.Load("prefabs/tiles/" + art.Name);
                    var parent = ((ClientChunk)this.Chunk).GetGameObject().transform;
                    _gameObj      = MainBehaviour.Instantiate(prefab, parent) as GameObject;
                    _gameObj.name = $"Tile_{X}-{Y}";
                    _gameObj.transform.position = new Vector3(X, 0, Y);
                    var tileBhv = _gameObj.GetComponent <TileRandomizerBehaviour>();
                    base.TileId = tileID;
                    tileBhv.CreateTileDecoration(this);
                    return;
                }
            }
        }
Exemple #11
0
 /// <summary>
 ///  Method Assigned class manualy for static reference
 /// </summary>
 public void AssignClass(MainBehaviour common)
 {
     MainModel.CommonBehaviours.Add(common);
 }
Exemple #12
0
 private void button1_Click(object sender, EventArgs e)
 {
     MainBehaviour.EntryPoint();
 }