public void Start() { GameDatas = GameDataService.Get(); var icons = new List <Icon>(GameDatas.Count); var canvas = GameObject.Find("MainCanvas").GetComponent <Canvas>() as Canvas; foreach (var gameData in GameDatas) { icons.Add(Icon.Instantiate(iconPrefab, canvas, gameData.Sprite, gameData.ExeAsExecutable)); } IconList = new IconList(icons); IconsAnimBehavior = new IconsAnimBehavior_3Box( IconList, selectingTransform, selectingFrameTransform, prevTransform, prevFramTransform, nextTransform, nextFramTransform, nonSelectingTransform); SelectingFrame = FindObjectOfType <SelectingFrame>() as SelectingFrame; IconsAnimBehavior.OnSelectingChanged += UpdateGameState; IconsAnimBehavior.OnSelectingChanged += (_) => { ToggleColorIconExistence(); }; var iconFlexAnim = IconList.Selecting.GetComponent <IconFlexibleAnimator>(); iconFlexAnim.OnAnimationStarted += () => { IsPlayingAnimation = true; }; iconFlexAnim.OnAnimationEnded += () => { IsPlayingAnimation = false; if (SelectingFrame.PositionNum != SelectingFrame.Position.GameIcon) { return; } SelectingFrame.DisplayGameIconFrame(true); }; backgroundVideoPlayer.url = Path.GetFullPath("ExternalFiles/movie.mp4"); UpdateGameState(0); ToggleColorIconExistence(); }
public void ToSelectingPrev() { SelectingFrame.DisplayGameIconFrame(false); IconsAnimBehavior.ToSelectingPrev(); }
public void ToSelectingFrameRight() { SelectingFrame.ToRight(); }
public void ToSelectingFrameLeft() { SelectingFrame.ToLeft(); }