Ejemplo n.º 1
0
    public override void Initialize()
    {
        if (NPC != null)//如果有NPC布置了击杀巫师的任务
        {
            //完成任务需求的对象
            talker = NPC.GetComponent <TalkUI>();
        }

        priorityInType = 1;

        player = GameObject.Find("Player");

        movementComponent = GetComponent <MovementWitcher>();
        if (movementComponent == null)
        {
            Debug.LogError("在Witcher中,没有找到Movement脚本!");
        }
        attackComponent = GetComponent <WitcherAttack>();
        if (attackComponent == null)
        {
            Debug.LogError("在Witcher中,没有找到Attack脚本!");
        }

        defenceComponent = GetComponent <DefenceEnemies>();
        if (defenceComponent == null)
        {
            Debug.LogError("在Witcher中,没有找到Defence脚本!");
        }
        //设置最大生命值
        defenceComponent.Initialize(10);
    }
Ejemplo n.º 2
0
    public override void Initialize()
    {
        if (NPC != null)//如果有NPC布置了击杀FlyEyes的任务
        {
            //完成任务需求的对象
            talker = NPC.GetComponent <TalkUI>();
        }

        priorityInType = 2;

        //movementComponent = GetComponent<FlyingEyeMovement>();
        //if (movementComponent == null)
        //{
        //    Debug.LogError("在FlyingEye中,没有找到Movement脚本!");
        //}
        attackComponent = GetComponent <FlyingEyeAttack>();
        if (attackComponent == null)
        {
            Debug.LogError("在FlyingEye中,没有找到Attack脚本!");
        }

        defenceComponent = GetComponent <DefenceEnemies>();
        if (defenceComponent == null)
        {
            Debug.LogError("在FlyingEye中,没有找到Defence脚本!");
        }
        //设置最大生命值
        defenceComponent.Initialize(3);
    }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     if (NPC != null)//如果有NPC布置了击杀Boss的任务
     {
         //完成任务需求的对象
         talker = NPC.GetComponent <TalkUI>();
     }
 }
Ejemplo n.º 4
0
    public void PressHello()
    {
        UIManager.Instance.Close(gameObject);
        UIManager.UIData data = UIManager.Instance.Open(UIID.Talk);
        GameObject       obj  = data.UIObject;

        if (obj != null)
        {
            TalkUI pdui = obj.GetComponent <TalkUI> ();
            pdui.SetName(_info.Name);
        }
    }
Ejemplo n.º 5
0
 protected override void ReleaseSelf(bool calledDestroy)
 {
     if (!calledDestroy)
     {
         EventDispatcher.Broadcast("GuideManager.TalkUIClose");
         MainTaskManager.Instance.ShowTalkUINpc = 0;
         UIStackManager.Instance.PopTownUI();
     }
     if (SystemConfig.IsReleaseResourceOn && calledDestroy)
     {
         TalkUI.Instance = null;
         base.ReleaseSelf(true);
     }
 }
Ejemplo n.º 6
0
 private void Awake()
 {
     TalkUI.Instance = this;
     base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false);
     GuideManager.Instance.out_system_lock = true;
 }
Ejemplo n.º 7
0
    bool isSpeaking;   //是否进行了语音输入


    // Start is called before the first frame update
    void Awake()
    {
        GetTextContent(DialogContent);
        talkUI = NPC.GetComponent <TalkUI>();
    }