コード例 #1
0
ファイル: Marine.cs プロジェクト: hycxa/codebattle-client
    void Awake()
    {
        GameObject SenceMain = GameObject.Find("SenceMain");

        NetWorkingScript = SenceMain.GetComponent<NetWorking>();
        targetPostion = transform.position;
        animation["Run"].speed = 2f;
    }
コード例 #2
0
ファイル: Marine.cs プロジェクト: yueyoum/codebattle-client
    void Awake()
    {
        GameObject SenceMain = GameObject.Find("SenceMain");

        NetWorkingScript       = SenceMain.GetComponent <NetWorking>();
        targetPostion          = transform.position;
        animation["Run"].speed = 2f;
    }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        smoke.emit = true;
        netWorkingScript = GameObject.Find("SenceMain").GetComponent<NetWorking>();

        Ray ray = new Ray(transform.position, transform.forward);
        RaycastHit hit;
        Physics.Raycast(ray, out hit, Mathf.Infinity, 1 << 9);
        finalPosition = hit.point + ray.direction * 2;

        // Debug.DrawRay(ray.origin, ray.direction*100, Color.green, Mathf.Infinity);
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        smoke.emit       = true;
        netWorkingScript = GameObject.Find("SenceMain").GetComponent <NetWorking>();

        Ray        ray = new Ray(transform.position, transform.forward);
        RaycastHit hit;

        Physics.Raycast(ray, out hit, Mathf.Infinity, 1 << 9);
        finalPosition = hit.point + ray.direction * 2;

        // Debug.DrawRay(ray.origin, ray.direction*100, Color.green, Mathf.Infinity);
    }
コード例 #5
0
    private void LoadComponents()
    {
        _netWorking = new NetWorking();
        _notyfy     = new Notyfy();
        _drawUI     = new DrawUI();

        _drawUI.GameHandler = this;
        _enemy                = EnemyGameObject.GetComponent <Enemy>();
        _enemyHandler         = EnemyGameObject.GetComponent <EnemyHandler>();
        _animatorDefeatNotyfy = DefeatNotyfy.GetComponent <Animator>();
        _animatorWinNotyfy    = WinNotyfy.GetComponent <Animator>();
        _rewardAD             = GetComponent <RewardAD>();
        _enemyHandler.Damage  = Damage;
        TimeHandle.Power(TimeGame);

        _enemyHandler.Notify += ChangeHealth;
        TimeHandle.OnChanges += SendNotifyEndTime;
        _rewardAD.Notify     += Reward;

        if (PlayerPrefs.HasKey("Record"))
        {
            Best = PlayerPrefs.GetInt("Record");
        }
    }