コード例 #1
0
    void Start()
    {
        controll   = GetComponent <CharacterController>();
        autoAreach = GetComponent <AutoAreach>().Init(controll);
        info       = GetComponent <AbstractInfo>() as MosterInfo;

        info.autoAreachState = EnumAutoAreach.Patrol;
        info.targetArray     = GameObject.Find("block").GetComponentsInChildren <Transform>();
    }
コード例 #2
0
    public AutoAreach Init(CharacterController controller)
    {
        this.controller = controller;
        mosterInfo      = GetComponent <MosterInfo>();
        speed           = mosterInfo.speed;
        maxSpeed        = speed * 2;

        return(this);
    }