Esempio n. 1
0
        private ShotManagerActionInfo BuildInvertData()
        {
            ShotManagerActionInfo data = new ShotManagerActionInfo();

            switch (newData.action)
            {
            case ShotManagerAction.AddShot:
            {
                data.action    = ShotManagerAction.DeleteShot;
                data.shotIndex = newData.shotIndex + 1;
            }
            break;

            case ShotManagerAction.DeleteShot:
            {
                data.action      = ShotManagerAction.AddShot;
                data.shotIndex   = newData.shotIndex - 1;
                data.shotName    = newData.shotName;
                data.shotStart   = newData.shotStart;
                data.shotEnd     = newData.shotEnd;
                data.shotColor   = newData.shotColor;
                data.camera      = newData.camera;
                data.shotEnabled = newData.shotEnabled;
            }
            break;

            case ShotManagerAction.DuplicateShot:
            {
                data.action    = ShotManagerAction.DeleteShot;
                data.shotIndex = newData.shotIndex;
            }
            break;

            case ShotManagerAction.MoveShot:
            {
                data.action     = ShotManagerAction.MoveShot;
                data.shotIndex  = newData.shotIndex + newData.moveOffset;
                data.moveOffset = -newData.moveOffset;
            }
            break;

            case ShotManagerAction.UpdateShot:
            {
            }
            break;
            }
            return(data);
        }
Esempio n. 2
0
 public void ApplyShotManagerAction(ShotManagerActionInfo info)
 {
     MixerClient.Instance.SendEvent <ShotManagerActionInfo>(MessageType.ShotManagerAction, info);
 }
Esempio n. 3
0
 private void Apply(ShotManagerActionInfo info)
 {
     SceneManager.ApplyShotManagegrAction(info);
 }
Esempio n. 4
0
 public CommandShotManager(ShotManagerActionInfo oldInfo, ShotManagerActionInfo newInfo)
 {
     oldData = oldInfo;
     newData = newInfo;
 }
Esempio n. 5
0
 public CommandShotManager(ShotManagerActionInfo info)
 {
     newData = info;
     oldData = BuildInvertData();
 }
Esempio n. 6
0
        public void SendShotManagerAction(ShotManagerActionInfo info)
        {
            NetCommand command = MixerUtils.BuildSendShotManagerAction(info);

            AddCommand(command);
        }