Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        rend      = GetComponentInChildren <Renderer>();
        submarine = GetComponent <Submarine>();
        weapon    = GetComponent <Weapon>();
        submarine.Init(rend.transform.parent);

        hurtable = GetComponent <Hurtable>();
        hurtable.Initialize(config.HealthConfig);
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        rend      = GetComponentInChildren <Renderer>();
        submarine = GetComponent <Submarine>();
        weapon    = GetComponent <Weapon>();
        submarine.Init(rend.transform.parent, config);

        hurtable = GetComponent <Hurtable>();
        hurtable.Initialize(config.HealthConfig);
        ReadConfig();

        crosshair = GetComponentInChildren <FollowMouse>();
    }