// ----Методы /// <summary> /// Инициализировать визуализацию для заданного графа и начать построение визуализации /// Необходимо вызывать каждый раз при замещении визуализируемого графа новым. /// </summary> /// <param name="graph">Граф, для которого необходимо строить визуализацию</param> public void Initialize(MsaglGraphWrapper graph) { Graph = graph; Graph.GraphChainged += OnGraphChanged; gViewer.Graph = graph.Graph; InteractiveMode = InteractiveMode.Interactive; }
public void EndCurrentPhase() { switch (m_interactiveMode) { case InteractiveMode.None: return; case InteractiveMode.Movement: if (m_pathFinder.tracking) { m_pathFinder.End(); m_activeMovementContext.UpdateTarget(null); m_cellPointerManager.SetAnimatedCursor(value: false); m_feedbackNeedsUpdate = true; } m_cellPointerManager.EndHighlightingPlayableCharacters(); break; case InteractiveMode.Target: if (m_targetContext != null && m_targetContext.End()) { m_cellPointerManager.SetDefaultLayer(); m_feedbackNeedsUpdate = true; } break; default: throw new ArgumentOutOfRangeException(); } m_inputHandler.SetDirty(); m_interactiveMode = InteractiveMode.None; }
public void SwipteType(bool slideRight) { Debug.Log("Cube orientation Changed"); if (slideRight) { // si on vas vers la droite switch (interactiveMode) { case InteractiveMode.Repulsive: interactiveMode = InteractiveMode.Emc; activeGauge = gaugeEmc; GaugeToRight(); break; case InteractiveMode.Attractive: interactiveMode = InteractiveMode.Repulsive; activeGauge = gaugeRepuls; GaugeToRight(); break; case InteractiveMode.Emc: interactiveMode = InteractiveMode.Attractive; activeGauge = gaugeAttract; GaugeToRight(); break; } } else { //si on vas vers la gauche switch (interactiveMode) { case InteractiveMode.Repulsive: interactiveMode = InteractiveMode.Attractive; activeGauge = gaugeAttract; GaugeToLeft(); break; case InteractiveMode.Attractive: interactiveMode = InteractiveMode.Emc; activeGauge = gaugeEmc; GaugeToLeft(); break; case InteractiveMode.Emc: interactiveMode = InteractiveMode.Repulsive; activeGauge = gaugeRepuls; GaugeToLeft(); break; } } NewDeco(); serverView.RPCEx("ChangeMode", RPCMode.All, cubeId, (int)interactiveMode); }
public void SetMovementPhase() { EndCurrentPhase(); m_interactiveMode = InteractiveMode.Movement; FightMapMovementContext localMovementContext = m_localMovementContext; if (localMovementContext != null) { m_cellPointerManager.BeginHighlightingPlayableCharacters(this, localMovementContext.entityProvider); } }
public void SetTargetingPhase([NotNull] IEnumerable <Target> targets) { if (m_targetContext == null) { Log.Error("Targeting phase requested but no target context exists.", 130, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\AbstractFightMap.cs"); return; } EndCurrentPhase(); m_interactiveMode = InteractiveMode.Target; m_targetContext.Begin(targets); m_cellPointerManager.SetCharacterFocusLayer(); m_feedbackNeedsUpdate = true; }
public static void Main(string[] args) { var passedArguments = new Arguments(args); IDatabase database = new SQLite(@"C:\git\personal\WatchMyPrices\myQuickDb.sqlite"); IWebQueryable webQueryable = new WebQueryable(); IPriceQueryable webPriceQueryable = new WebPriceQueryable(webQueryable, database); IInteractionMode mode = null; if (passedArguments.IsWatchMode) { mode = new WatchMode(webPriceQueryable, database, passedArguments.TimeInterval); } else { mode = new InteractiveMode(database); } mode.Run(); }
protected override void OnInstanceInit() { mCurPlayerName = ""; mCurPlayerInitial = ""; mCaptureInfos = null; mCurrentInteractMode = null; if (captureScreenTexture) { DestroyImmediate(captureScreenTexture); captureScreenTexture = null; } mVolatileAcquisitions = new List <VolatileItem>((int)VolatileType.Count); mAcquisitions = new List <DeviceAcquisition>(); mAcquisitionCurIndex = 0; mAcquisitionCurSubIndex = 0; mSearchKeywords = new List <SearchKeywordData>(); mActivityLogs = new List <ActivityLogItem>(); }
//Determine if an element can dock public virtual bool CanDock(InteractiveMode interactiveMode, MouseElements mouseElements) { if (interactiveMode == InteractiveMode.Normal) { //Check is shape or port if (mouseElements.MouseMoveElement is Shape || mouseElements.MouseMoveElement is Port) { //return false if permission not available to dock if (mouseElements.MouseStartOrigin != null) { Origin origin = mouseElements.MouseStartOrigin; Link line = (Link)mouseElements.MouseStartElement; if (mouseElements.MouseMoveElement is Shape) { Shape shape = (Shape)mouseElements.MouseMoveElement; if (shape.Direction == Direction.None) { return(false); } if (origin == line.Start && shape.Direction == Direction.In) { return(false); } if (origin == line.End && shape.Direction == Direction.Out) { return(false); } } if (mouseElements.MouseMoveElement is Port) { Port port = (Port)mouseElements.MouseMoveElement; if (port.Direction == Direction.None) { return(false); } if (origin == line.Start && port.Direction == Direction.In) { return(false); } if (origin == line.End && port.Direction == Direction.Out) { return(false); } } } return(true); } } //Can dock for interactive elements else { if (mouseElements.InteractiveElement is Link) { Link line = (Link)mouseElements.InteractiveElement; //Determine if applies to start or end origin if (mouseElements.InteractiveOrigin == line.Start) { if (mouseElements.MouseMoveElement is Shape) { Shape shape = (Shape)mouseElements.MouseMoveElement; if (shape.Direction == Direction.None) { return(false); } if (shape.Direction == Direction.In) { return(false); } } if (mouseElements.MouseMoveElement is Port) { Port port = (Port)mouseElements.MouseMoveElement; if (port.Direction == Direction.None) { return(false); } if (port.Direction == Direction.In) { return(false); } } } else { if (mouseElements.MouseMoveElement is Shape) { Shape shape = (Shape)mouseElements.MouseMoveElement; if (shape.Direction == Direction.None) { return(false); } if (shape.Direction == Direction.Out) { return(false); } } if (mouseElements.MouseMoveElement is Port) { Port port = (Port)mouseElements.MouseMoveElement; if (port.Direction == Direction.None) { return(false); } if (port.Direction == Direction.Out) { return(false); } } } return(true); } } return(false); }
public void SetNewType(int newType) { interactiveMode = (InteractiveMode)newType; NewDeco (); }
public void SwipteType(bool slideRight) { Debug.Log ("Cube orientation Changed"); if(slideRight) { // si on vas vers la droite switch(interactiveMode) { case InteractiveMode.Repulsive : interactiveMode = InteractiveMode.Emc; activeGauge = gaugeEmc; GaugeToRight(); break; case InteractiveMode.Attractive : interactiveMode = InteractiveMode.Repulsive; activeGauge = gaugeRepuls; GaugeToRight (); break; case InteractiveMode.Emc : interactiveMode = InteractiveMode.Attractive; activeGauge = gaugeAttract; GaugeToRight (); break; } } else { //si on vas vers la gauche switch(interactiveMode) { case InteractiveMode.Repulsive : interactiveMode = InteractiveMode.Attractive; activeGauge = gaugeAttract; GaugeToLeft (); break; case InteractiveMode.Attractive : interactiveMode = InteractiveMode.Emc; activeGauge = gaugeEmc; GaugeToLeft (); break; case InteractiveMode.Emc : interactiveMode = InteractiveMode.Repulsive; activeGauge = gaugeRepuls; GaugeToLeft (); break; } } NewDeco(); serverView.RPCEx("ChangeMode", RPCMode.All, cubeId, (int)interactiveMode); }
internal RunResult(int returnCode, InteractiveMode mode) { ReturnCode = returnCode; InteractiveMode = mode; }
public void SetNoInteractionPhase() { EndCurrentPhase(); m_interactiveMode = InteractiveMode.None; }
public void SetNewType(int newType) { interactiveMode = (InteractiveMode)newType; NewDeco(); }
private void Update() { //记录本次游戏时间 m_PlayerModel.TotalOnline += TimeSpan.FromSeconds(1f / 60); if (!Cursor.visible) { //按键检测 if (Input.GetKeyUp(KeyCode.Q)) { PickUp(m_LHand); } if (Input.GetKeyUp(KeyCode.E)) { PickUp(m_RHand); } if (Input.GetKeyUp(KeyCode.F)) { StoryManager.Singleton.SurveyOrDialog(); } if (Input.GetMouseButtonUp(0)) { if (m_InteractiveMode == InteractiveMode.普通) { Use(m_LHand); } else if (m_InteractiveMode == InteractiveMode.战斗) { Attack(m_LHand); } else if (m_InteractiveMode == InteractiveMode.投掷) { Throw(m_LHand); } } if (Input.GetMouseButtonUp(1)) { if (m_InteractiveMode == InteractiveMode.普通) { Use(m_RHand); } else if (m_InteractiveMode == InteractiveMode.战斗) { Attack(m_RHand); } else if (m_InteractiveMode == InteractiveMode.投掷) { Throw(m_RHand); } } if (Input.GetKeyUp(KeyCode.Tab)) { switch (m_InteractiveMode) { case InteractiveMode.普通: m_InteractiveMode = InteractiveMode.战斗; Debug.Log("准备攻击"); break; case InteractiveMode.战斗: m_InteractiveMode = InteractiveMode.投掷; Debug.Log("准备投掷"); break; case InteractiveMode.投掷: m_InteractiveMode = InteractiveMode.普通; Debug.Log("准备使用"); break; } } if (Input.GetKeyUp(KeyCode.V)) { CameraManager.Singleton.SwitchCamera(); } SetAnimation(); } else { if (Input.GetKeyUp(KeyCode.F) | Input.GetKeyUp(KeyCode.Space) | Input.GetKeyUp(KeyCode.Return) | Input.GetMouseButtonUp(0)) { StoryManager.Singleton.NextSentence(); } } }
void CreateWave(int cubeID, int intMode) { Vector3 cubePos = cubesList[cubeID].transform.position; if (isStuartTablet) { if (cubesList[cubeID].transform.parent.GetComponent <DefaultTrackableEventHandler>().isActive == true) { //si le cube sur lequel on lance la vague est actif cubePos = cubesList[cubeID].transform.position; } else if (stuartObj.GetComponent <DefaultTrackableEventHandler>().isActive) { Vector3 distanceStuartCubes = cubesListNetwork[cubeID].transform.position - stuartObjNetwork.transform.position; Vector3 calculatedNetworkPosition = Quaternion.Inverse(stuartObjNetwork.transform.rotation) * (distanceStuartCubes); cubePos = calculatedNetworkPosition; } else { cubePos = new Vector3(1000, 1000, 1000); } } InteractiveMode waveType = (InteractiveMode)intMode; GameObject repulsiveWave = (GameObject)Resources.Load("Tablet/StuartWaveRepulsive") as GameObject; GameObject attractiveWave = (GameObject)Resources.Load("Tablet/StuartWaveAttractive") as GameObject; GameObject emcWave = (GameObject)Resources.Load("Tablet/StuartWaveEmc") as GameObject; GameObject wavePrefab = attractiveWave; switch (waveType) { case InteractiveMode.Repulsive: wavePrefab = repulsiveWave; if (Network.isServer) { soundManager.Trigger(SoundManager.SoundType.repulsive); } break; case InteractiveMode.Attractive: wavePrefab = attractiveWave; if (Network.isServer) { soundManager.Trigger(SoundManager.SoundType.attractive); } break; case InteractiveMode.Emc: wavePrefab = emcWave; if (Network.isServer) { soundManager.Trigger(SoundManager.SoundType.emc); } CreateEmc(cubeID); break; } GameObject tmpWave = (GameObject)Instantiate(wavePrefab, cubePos, cubesList[cubeID].transform.rotation); if (isStuartTablet) { if (cubesList[cubeID].transform.parent.GetComponent <DefaultTrackableEventHandler>().isActive == true) { tmpWave.transform.parent = cubesList[cubeID].transform; tmpWave.transform.localPosition = Vector3.zero; } } }