protected override void Awake() { base.Awake(); SetAnimEnabled(false); // make sure we have initialized static members if (pieceVars == null) { pieceVars = Globals.pieceVars; pieceParent = new GameObject("__PieceParent__").transform; pFactory = SjParticleFactory.instance; } spriteTrans = spriteRen.GetComponent <Transform>(); color = PieceColor.Blue; align = Alignment.Horizontal; gridPos = -1; trans.parent = pieceParent; }
void Awake() { instance = this; }