Example #1
0
        public void SwapPiece(TimelinePiece.TimelinePiece piece1, TimelinePiece.TimelinePiece piece2)
        {
            if (piece1 == null || piece2 == null)
            {
                throw new ArgumentException();
            }
            var piece1Active = piece1.IsActive;

            piece1.IsActive = piece2.IsActive;
            piece2.IsActive = piece1Active;
            var piece1Color = piece1.MeshRenderer.material.color;

            piece1.MeshRenderer.material.color = piece2.MeshRenderer.material.color;
            piece2.MeshRenderer.material.color = piece1Color;
            this.ResetActivePieces();
        }
Example #2
0
 public void SwapPiece(TimelinePiece.TimelinePiece piece1, GameObject piece2)
 {
     this.SwapPiece(piece1, this.GetPiece(piece2));
 }
Example #3
0
 public void ReactivatePiece(TimelinePiece.TimelinePiece piece)
 {
     piece.IsActive         = true;
     piece.transform.parent = this.componentSettings.Transform;
 }
Example #4
0
 public void InsertLast(TimelinePiece.TimelinePiece piece)
 {
     this.timelinePieces.AddLast(piece);
     this.ResetActivePieces();
 }