Пример #1
0
    public void OnNetInstantiate(ItemSolidArgument arg)
    {
        item = arg.item;

        transform.position = arg.spawnPos;

        _effector = gameObject.AddComponent<ItemSpawnEffector>();
        _effector.xzAngle = arg.xzAngle;
        _effector.xzSpeed = arg.xzSpeed;
        var floater = gameObject.AddComponent<Floater>();
        floater.amplitude = 0.2f;
        floater.frequency = 2;
        floater.rotationSpeed = 1.5f;
    }
Пример #2
0
    public void OnNetInstantiate(ItemSolidArgument arg)
    {
        item = arg.item;

        transform.position = arg.spawnPos;

        _effector         = gameObject.AddComponent <ItemSpawnEffector>();
        _effector.xzAngle = arg.xzAngle;
        _effector.xzSpeed = arg.xzSpeed;
        var floater = gameObject.AddComponent <Floater>();

        floater.amplitude     = 0.2f;
        floater.frequency     = 2;
        floater.rotationSpeed = 1.5f;
    }