private void Awake()
        {
            seamoth = GetComponent <SeaMoth>();

            objectHelper = ArmServices.main.objectHelper;

            vfxConstructing = GetComponent <VFXConstructing>();

            light_left         = objectHelper.FindDeepChild(gameObject, "light_left").transform;
            light_left_default = new PureTransform(light_left.localPosition, light_left.localRotation, light_left.localScale);
            light_left_UP      = new PureTransform(new Vector3(0f, 0.68f, 1f), Quaternion.Euler(0, 0, 0), light_left.localScale);

            light_right         = objectHelper.FindDeepChild(gameObject, "light_right").transform;
            light_right_default = new PureTransform(light_right.localPosition, light_right.localRotation, light_right.localScale);
            light_right_DOWN    = new PureTransform(new Vector3(0f, -1.21f, 1.04f), Quaternion.Euler(35, 0, 0), light_left.localScale);

            GameObject leftArmAttachPoint = objectHelper.CreateGameObject("leftArmAttachPoint", seamoth.torpedoTubeLeft, new Vector3(-0.93f, 0f, -0.74f), new Vector3(346, 23, 0));

            leftArmAttach = leftArmAttachPoint.transform;

            GameObject rightArmAttachPoint = objectHelper.CreateGameObject("rightArmAttachPoint", seamoth.torpedoTubeRight, new Vector3(0.93f, 0f, -0.74f), new Vector3(346, 337, 360));

            rightArmAttach = rightArmAttachPoint.transform;

            GameObject leftAimForward = objectHelper.CreateGameObject("leftAimForward", seamoth.transform);

            aimTargetLeft = leftAimForward.transform;

            GameObject rightAimForward = objectHelper.CreateGameObject("rightAimForward", seamoth.transform);

            aimTargetRight = rightAimForward.transform;
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            seamoth = GetComponent <SeaMoth>();

            vfxConstructing = GetComponent <VFXConstructing>();

            light_left         = gameObject.FindChildInMaxDepth("light_left").transform;
            light_left_default = new PureTransform(light_left.localPosition, light_left.localRotation, light_left.localScale);
            light_left_UP      = new PureTransform(new Vector3(0f, 0.68f, 1f), Quaternion.Euler(0, 0, 0), light_left.localScale);

            light_right         = gameObject.FindChildInMaxDepth("light_right").transform;
            light_right_default = new PureTransform(light_right.localPosition, light_right.localRotation, light_right.localScale);
            light_right_DOWN    = new PureTransform(new Vector3(0f, -1.21f, 1.04f), Quaternion.Euler(35, 0, 0), light_left.localScale);

            SeamothArmPrefabs = CreateGameObject("SeamothArmPrefabs", gameObject.transform);

            SeamothArmPrefabs.SetActive(false);

            InitializeArmsCache();

            GameObject leftArmAttachPoint = CreateGameObject("leftArmAttachPoint", seamoth.torpedoTubeLeft, new Vector3(-0.93f, 0f, -0.74f), new Vector3(346, 23, 0));

            leftArmAttach = leftArmAttachPoint.transform;

            GameObject rightArmAttachPoint = CreateGameObject("rightArmAttachPoint", seamoth.torpedoTubeRight, new Vector3(0.93f, 0f, -0.74f), new Vector3(346, 337, 360));

            rightArmAttach = rightArmAttachPoint.transform;

            GameObject leftAimForward = CreateGameObject("leftAimForward", seamoth.transform);

            aimTargetLeft = leftAimForward.transform;

            GameObject rightAimForward = CreateGameObject("rightAimForward", seamoth.transform);

            aimTargetRight = rightAimForward.transform;

            UpdateArmRenderers();
        }