public void createItem(MovableItemOnStage item) { if (isGameStop) return; MovableItemOnStage tmpObject; tmpObject = Instantiate(item, transform.position, transform.rotation) as MovableItemOnStage; tmpObject.transform.parent = stage.transform; }
void initData() { track = GameObject.FindObjectOfType<Track>(); moveTarget = target as MovePanelOnScene; mItem = moveTarget.getMovableItem(); originLineNo = mItem.getLineNoTrackEnum(); originIndex = mItem.getIndex(); }
void OnSceneGUI() { MoveButtonOnScene tmp = target as MoveButtonOnScene; mTarget = tmp.transform.parent.GetComponent<MovableItemOnStage>(); ; if (mTarget.transform.parent == null) return; track = mTarget.transform.parent.GetComponent<Track>(); DrawButton(Track.MoveDestination.FORWARD); DrawButton(Track.MoveDestination.BACKWARD); DrawButton(Track.MoveDestination.WESTLINE); DrawButton(Track.MoveDestination.EASTLINE); DrawButton(Track.MoveDestination.NORTHLINE); DrawButton(Track.MoveDestination.SOUTHLINE); DrawButton(Track.MoveDestination.MIDLINE); }