protected override void Start() { base.Start(); canBeFought = GetComponent <CanBeFoughtMachanism>(); if (canBeFought == null) { Debug.LogError("在" + gameObject.name + "中,找不到CanBeFoughtMachanism组件"); } if (mechanism == null) { Debug.LogError("在" + gameObject.name + "中,获取MovablePlatform失败"); } }
protected override void Start() { base.Start(); canBeFought = GetComponent <CanBeFoughtMachanism>(); if (canBeFought == null) { Debug.LogError("在" + gameObject.name + "中,找不到CanBeFoughtMachanism组件"); } light = GetComponent <Light2D>(); if (light == null) { Debug.LogError("在" + gameObject.name + "中,找不到Light组件"); } //初始化灯光 light.enabled = false; }
protected override void Start() { base.Start(); canBeFought = GetComponent <CanBeFoughtMachanism>(); if (canBeFought == null) { Debug.LogError("在" + gameObject.name + "中,找不到CanBeFoughtMachanism组件"); } if (wizard != null) { wizard.SetActive(false); } if (mechanisms.Length == 0) { Debug.LogError("在" + gameObject.name + "中,未初始化mechanisms"); } passTime = triggerIntervalTime; enabled = false; }