// Start is called before the first frame update void Start() { Turn = FindObjectOfType <gameplay>(); result = GameObject.FindGameObjectsWithTag("result")[0].GetComponent <Text>(); Move = GameObject.FindGameObjectsWithTag("dicevalue")[0].GetComponent <Text>(); Rmove = 0; }
void Start() { joystick = FindObjectOfType <FixedJoystick>(); Move = GameObject.FindGameObjectsWithTag("dicevalue")[0].GetComponent <Text>(); dice = GameObject.FindGameObjectsWithTag("Dice")[0].GetComponent <Button>(); cam = GameObject.FindGameObjectWithTag("MainCamera").transform; Turn = FindObjectOfType <gameplay>(); Rmove = 0; Strt = false; }
void Awake() { if (instance != null) { Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(this.gameObject); } }
// ----------------------------------------------------------------------------------------------------------------- // STATIC public static gameplay Instantiate(gameplay.CConfig cfg) { gameplay obj = utils.Instantiate(null, "gameplay").AddComponent <gameplay>(); obj.m_player = player.Instantiate(cfg.player, "player"); obj.m_camera = rotating_camera.Instantiate(cfg.camera, "camera", obj.m_player.gameObject); obj.m_level = level.Instantiate(cfg.level, "level"); obj.m_path = path.Instantiate(cfg.path, "player-path"); obj.m_tail = tail.Instantiate(cfg.tail, "player-tail", obj.m_path, obj.m_level); obj.m_compas = compas.Instantiate(cfg.compas, "compas"); obj.m_config = cfg; obj.m_level_tags = obj.m_level.GetTagOwner(); obj.SetPlayerPosition((int)cfg.spawn_pos.x, (int)cfg.spawn_pos.y, cfg.spawn_dir); for (int i = 0; i < cfg.spawn_tail_size; i++) { obj.m_tail.AddSegment(); } return(obj); }
// Token: 0x06001458 RID: 5208 RVA: 0x00021680 File Offset: 0x00020680 protected internal override void Execute(ActivityExecutionContext context) { List <int> list = new List <int>(); for (gameplay gameplay = base.Event.EventDef; gameplay != null; gameplay = gameplay.Parent) { uint num = gameplay.Num_BlackBoardMap(); for (uint num2 = 0u; num2 < num; num2 += 1u) { BlackBoardSlot blackBoardSlot = gameplay.BlackBoardMap(num2); uint mBits = blackBoardSlot.mFlags.mBits; if ((mBits & this.flags) != 0u) { BlackBoardChannel mChannel = blackBoardSlot.mChannel; if (!list.Contains((int)mChannel)) { BlackBoard.Get().Change(mChannel, blackBoardSlot.mBlackBoardKey.GetKey()); list.Add((int)mChannel); } } } } }
////////////////////////////////////////////////////////////////////////// gameplay() { Instance = this; }
// Use this for initialization void Awake() { SP = this; }
// Use this for initialization void Start() { gp = gameplayRoot.GetComponent <gameplay>(); button = GetComponent <UnityEngine.UI.Button>(); }
// ----------------------------------------------------------------------------------------------------------------- private void Start() { m_config.gameplay.Finalize(); m_gameplay = gameplay.Instantiate(m_config.gameplay); }
// Start is called before the first frame update void Start() { result = GameObject.FindGameObjectsWithTag("result")[0].GetComponent <Text>(); play = GameObject.FindObjectOfType <gameplay>(); }