public static UISortieShip Instantiate(UISortieShip prefab, Transform parent, UISortieShip.Direction iDirection)
        {
            UISortieShip uISortieShip = Object.Instantiate <UISortieShip>(prefab);

            uISortieShip.get_transform().set_parent(parent);
            uISortieShip.get_transform().localPositionZero();
            uISortieShip.get_transform().localScaleOne();
            return(uISortieShip.VirtualCtor(iDirection));
        }
Example #2
0
        private LTDescr PlayShipMoveAnim(UISortieShip sortieShip)
        {
            Vector3 originPos = sortieShip.get_transform().get_localPosition();
            float   rotCnt    = 3f;

            return(base.get_transform().LTValue(0f, rotCnt, 3f).setEase(LeanTweenType.easeOutQuad).setOnUpdate(delegate(float x)
            {
                float num = (x >= rotCnt / 2f) ? (30f * (rotCnt - x)) : (30f * x);
                Vector3 vector = new Vector2(num * Mathf.Sin(x % 1f * 3.14159274f * 2f), num * Mathf.Cos(x % 1f * 3.14159274f * 2f));
                sortieShip.get_transform().set_localPosition(vector + originPos);
            }));
        }