Exemplo n.º 1
0
    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失败");
        }
    }
Exemplo n.º 2
0
    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;
    }
Exemplo n.º 3
0
    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;
    }