Exemplo n.º 1
0
        public static StrategyHexBreak Instantiate(StrategyHexBreak prefab, Transform fromParent)
        {
            StrategyHexBreak strategyHexBreak = UnityEngine.Object.Instantiate(prefab);

            strategyHexBreak.transform.parent        = fromParent;
            strategyHexBreak.transform.localScale    = Vector3.one;
            strategyHexBreak.transform.localPosition = new Vector3(0f, 0f, -1f);
            strategyHexBreak.init();
            return(strategyHexBreak);
        }
Exemplo n.º 2
0
        public static StrategyHexBreak Instantiate(StrategyHexBreak prefab, Transform fromParent)
        {
            StrategyHexBreak strategyHexBreak = Object.Instantiate <StrategyHexBreak>(prefab);

            strategyHexBreak.get_transform().set_parent(fromParent);
            strategyHexBreak.get_transform().set_localScale(Vector3.get_one());
            strategyHexBreak.get_transform().set_localPosition(new Vector3(0f, 0f, -1f));
            strategyHexBreak.init();
            return(strategyHexBreak);
        }
Exemplo n.º 3
0
        public void StartTileBreakAnimation(Action Onfinished)
        {
            StrategyHexBreak strategyHexBreak = StrategyHexBreak.Instantiate(Resources.Load <StrategyHexBreak>("Prefabs/StrategyPrefab/StrategyTop/TileBreak"), base.transform);

            this.DelayActionFrame(3, delegate
            {
                strategyHexBreak.Play(delegate
                {
                    Onfinished();
                    base.transform.localScale = Vector3.zero;
                    UnityEngine.Object.Destroy(strategyHexBreak.gameObject);
                });
                HexTile.alpha  = 0f;
                GrowTile.alpha = 0f;
            });
        }