private bool DeterminePath(Player sourcePlayer, Card sourceCard, Card targetCard) { if (this.m_pathNodes == null) { iTweenPath path; SpellPath path2; if ((this.m_Paths == null) || (this.m_Paths.Count == 0)) { UnityEngine.Debug.LogError(string.Format("SpellMoveToTarget.DeterminePath() - no SpellPaths available", new object[0])); return(false); } iTweenPath[] components = base.GetComponents <iTweenPath>(); if ((components == null) || (components.Length == 0)) { UnityEngine.Debug.LogError(string.Format("SpellMoveToTarget.DeterminePath() - no iTweenPaths available", new object[0])); return(false); } if (!this.FindBestPath(sourcePlayer, sourceCard, components, out path, out path2) && !this.FindFallbackPath(components, out path, out path2)) { return(false); } this.m_spellPath = path2; this.m_pathNodes = path.nodes.ToArray(); } this.FixupPathNodes(sourcePlayer, sourceCard, targetCard); this.SetStartPosition(); return(true); }
private bool FindBestPath(Player sourcePlayer, Card sourceCard, iTweenPath[] pathComponents, out iTweenPath tweenPath, out SpellPath spellPath) { tweenPath = null; spellPath = null; if (sourcePlayer == null) { return(false); } if (sourcePlayer.GetSide() == Player.Side.FRIENDLY) { if (< > f__am$cacheB == null) {